Point3D.normalizeViewport
void normalizeViewport(graphene.rect.Rect viewport, float zNear, float zFar, out graphene.point3_d.Point3D res)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.
Parameters
viewport | a #graphene_rect_t representing a viewport |
zNear | the coordinate of the near clipping plane, or 0 for the default near clipping plane |
zFar | the coordinate of the far clipping plane, or 1 for the default far clipping plane |
res | the return location for the normalized #graphene_point3d_t |