setProjection
Sets the projection matrix from a frustum defined by six planes.
Parameters
type of projection to use
distance in world units from the camera to the left plane, at the near plane. Precondition: left
!= right
distance in world units from the camera to the right plane, at the near plane. Precondition: left
!= right
distance in world units from the camera to the bottom plane, at the near plane. Precondition: bottom
!= top
distance in world units from the camera to the top plane, at the near plane. Precondition: bottom
!= top
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.
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.
These parameters are silently modified to meet the preconditions above.
See also
Sets the projection matrix from the field-of-view.
Parameters
full field-of-view in degrees. 0 <fovInDegrees
< 180
aspect ratio width/height. aspect
0
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.
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 of the field-of-view parameter.
These parameters are silently modified to meet the preconditions above.