guFrustum
Creates a frustum (perspective projection) projection matrix (fixed point)
#include <ultra64.h> /* gu.h */
void guFrustum(
Mtx *m,
float l,
float r,
float b,
float t,
float n,
float f,
float scale);
None
Returns the frustum projection matrix to the structure indicated by m. The result of calling this function is the creation of a projection matrix like the one shown below:
The near clipping plane is a rectangle with the lower-left vertex at (l, b, -n) and the upper-right vertex at (r, t, -n). Near and far (n and f) must both be positive values. The arguments may appear the same as for guOrtho, but they have different meanings. This function specifies the viewable region of the perspective transformation (the viewing volume), which is shaped like a square-based pyramid with its top cut off. However, the function is not a very practical way to make the specifications for a perspective projection. Normally you would use guPerspective to make the settings for a perspective projection. For details about the fixed-point format, see gSPMatrix. The function guFrustumF is available for handling floating point.
The Mtx structure is shown below:
typedef long Mtx_t[4][4];
typedef union {
Mtx_t m;
long long int force_structure_alignment;
} Mtx;
gSPMatrix, guFrustumF, guLookAt, guLookAtF, guOrtho, guOrthoF, guPerspective, and guPerspectiveF
03/01/99 Completely rewritten.