#include <revolution/mtx.h>
void MTXPerspective (
Mtx44 m,
f32 fovy,
f32 aspect,
f32 n,
f32 f );
m |
New 4x4 perspective 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 projection matrix with two parameters for field-of-view and aspect ratio. This matrix is used by the GX API to convert points to screen space.
MTXPerspective generates a projection matrix, equivalent to that created by MTXFrustum, with the axis of projection centered around Z. 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 view window in view space. n and f must both be positive values.
Note: m must possess a negative "Z" value in order to make converted points visible after projection in view space.
Mtx44, Mtx44Ptr, MTXFrustum, MTXOrtho
03/01/2006 Initial version.