#include <revolution/mtx.h>
void MTXPerspective (
Mtx44 m,
f32 fovy,
f32 aspect,
f32 n,
f32 f );
m |
New 4x4 projection matrix |
|---|---|
| fovy | Total field of view in the Y-Z plane measured in degrees |
aspect |
View window aspect ratio (width/height) |
n |
Positive distance to near clipping plane. |
f |
Positive distance to far clipping plane. |
None.
Sets the 4x4 perspective transform matrix based on two parameters for field-of-view and aspect ratio. This matrix is used by the GX API to transform points to screen space.
The MTXPerspective function generates a projection matrix, equivalent to that created by the MTXFrustum function, with the axis of projection centered around the Z axis. This function is included to provide an alternative method of specifying the size of the view frustum.
The field of view (fovy) is the total field of view in degrees in the YZ plane. aspect is the ratio (width/height) of the viewing window in view space. Both n and f must be positive values representing the distance to the near and far clipping planes, respectively.
Note: m must possess a negative Z value in order to make points that have been subjected to transform visible after projection to view space.
Mtx44, Mtx44Ptr, MTXFrustum, MTXOrtho
2006/03/01 Initial version.
CONFIDENTIAL