PEXOrthoProjMatrix(3) — Subroutines
Name
PEXOrthoProjMatrix
Synopsis
int PEXOrthoProjMatrix(double height, double aspect, double near, double far, PEXMatrix matrix_return)
Arguments
heightThe height of the orthographic viewing box.
aspectThe aspect ratio (width/height) of the orthographic viewing box.
nearThe distance, in view reference coordinates, from the VRC origin to the front clipping plane.
farThe distance, in view reference coordinates, from the VRC origin to the back clipping plane.
matrix_return
matrix in which result is stored
Returns
Zero if successful; otherwise, one of the following:
PEXBadLimits - the viewing box depth, width, or height is zero.
Description
This routine formats a view mapping matrix.
A projection matrix defines a visible region of the coordinate space. An orthographic projection defines the visible region as a box specified by its height, width (the height multiplied by the aspect), and its near and far boundaries.
The reference point for the projection is the origin of VRC; the near and far clipping planes are defined with respect to it. The height is defined in view reference coordinates. Clipping at the planes is controlled by the clipping flags in the selected view table entry.
Errors
None
See Also
PEXLookAtViewMatrix, PEXViewOrientationMatrix, PEXViewMappingMatrix,
PEXPerspProjMatrix