[ Version ( since = "1.4" ) ]
public Point3D normalize_viewport (Rect viewport, float z_near, float z_far)
Normalizes the coordinates of a Point3D using the given viewport and clipping planes.
The coordinates of the resulting Point3D will be in the [ -1, 1 ] range.
this |
a Point3D |
viewport |
a Rect representing a viewport |
z_near |
the coordinate of the near clipping plane, or 0 for the default near clipping plane |
z_far |
the coordinate of the far clipping plane, or 1 for the default far clipping plane |
res |
the return location for the normalized Point3D |