PEXOrthoProjMatrix Utility


Synopsis

 
   int PEXOrthoProjMatrix(
       double height,
       double aspect,
       double near,
       double far,
       PEXMatrix matrix_return
   )
 

Arguments

height
The height of the orthographic viewing box.

aspect
The aspect ratio (width/height) of the orthographic viewing box.

near
The distance, in view reference coordinates, from the VRC origin to the front clipping plane.

far
The 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

Invoke PEXOrthoProjMatrix to create 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

For a list of viewing transformation utilities, see Viewing Transformation Utilities. For a list of related topics, see PEXlib Utilities.