Point3D.normalizeViewport

Normalizes the coordinates of a #graphene_point3d_t using the given viewport and clipping planes.

The coordinates of the resulting #graphene_point3d_t will be in the [ -1, 1 ] range.

class Point3D
void
normalizeViewport
(,
float zNear
,
float zFar
,)

Parameters

viewport Rect

a #graphene_rect_t representing a viewport

zNear float

the coordinate of the near clipping plane, or 0 for the default near clipping plane

zFar float

the coordinate of the far clipping plane, or 1 for the default far clipping plane

res Point3D

the return location for the normalized #graphene_point3d_t

Meta