setProjection
fun setProjection(fovInDegrees: Double, near: Float = _near, far: Float = _far, direction: Camera.Fov = Camera.Fov.VERTICAL, aspect: Double = getViewPortAspect())
Sets the projection matrix from the field-of-view.
Parameters
fovInDegrees
full field-of-view in degrees. 0 <fovInDegrees
< 180
aspect
aspect ratio width/height. aspect
0
near
distance in world units from the camera to the near plane. The near plane's position in view space is z = -near
. Precondition: near
0 for Projection.PERSPECTIVE or near
!= far
for Projection.ORTHO.
far
distance in world units from the camera to the far plane. The far plane's position in view space is z = -far
. Precondition: far
near
for Projection.PERSPECTIVE or far
!= near
for Projection.ORTHO.
direction
direction of the field-of-view parameter.
These parameters are silently modified to meet the preconditions above.