project

fun project(x: Double, y: Double, z: Double, viewport: Viewport, result: Vec3): Boolean

Projects a Cartesian point to screen coordinates. This method assumes this matrix represents an inverse modelview-projection matrix. The result of this method is undefined if this matrix is not an inverse modelview-projection matrix.
The resultant screen point is in OpenGL screen coordinates, with the origin in the bottom-left corner and axes that extend up and to the right from the origin.
This stores the projected point in the result argument, and returns a boolean value indicating whether or not the projection is successful. This returns false if the Cartesian point is clipped by the near clipping plane or the far clipping plane.

Return

true if the transformation is successful, otherwise false

Parameters

x

the Cartesian point's X component

y

the Cartesian point's y component

z

the Cartesian point's z component

viewport

the viewport defining the screen point's coordinate system

result

a pre-allocated Vec3 in which to return the projected point