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

viewporta #graphene_rect_t representing a viewport
zNearthe coordinate of the near clipping plane, or 0 for the default near clipping plane
zFarthe coordinate of the far clipping plane, or 1 for the default far clipping plane
resthe return location for the normalized #graphene_point3d_t