setToInfiniteProjection

fun setToInfiniteProjection(viewportWidth: Int, viewportHeight: Int, vFieldOfView: Angle, nearDistance: Double): Matrix4

Sets this matrix to an infinite perspective projection matrix for the specified viewport dimensions, vertical field of view and near clip distance.
An infinite perspective projection matrix maps points in a manner similar to a standard projection matrix, but is not bounded by depth. Objects at any depth greater than or equal to the near distance may be rendered. In addition, this matrix interprets vertices with a w-coordinate of 0 as infinitely far from the camera in the direction indicated by the point's coordinates.
The field of view must be positive and less than 180. The near distance must be positive.

Parameters

viewportWidth

the viewport width in screen coordinates

viewportHeight

the viewport height in screen coordinates

vFieldOfView

the vertical field of view

nearDistance

the near clip plane distance in model coordinates

Throws

If either the width or the height is less than or equal to zero, if the field of view is less than or equal to zero or greater than 180, if the near distance is less than or equal to zero