guMtxXFML

guMtxXFML [Function]

Function

guMtXFML

Coordinate transformation (fixed-point matrix)

Syntax

#include <ultra64.h>        /* gu.h */
void guMtxXFML(
        Mtx *m,
        float x,
        float y,
        float z,
        float *ox,
        float *oy,
        float *oz);

Arguments

m
Pointer to the 4x4 matrix
x
x-coordinate to transform
y
y-coordinate to transform
z
z-coordinate to transform
ox
Pointer to resulting x-coordinate
oy
Pointer to resulting y-coordinate
oz
Pointer to resulting z-coordinate

Returned value

None.

Description

Transforms one set of coordinates (x, y, z) using the specified matrix. This function provides a useful way to process matrices on the host CPU. When this function is called, the result is the creation of coordinates as shown below:

For a detailed explanation about the fixed-point format, see gSPMatrix. Floating point is handled with the guMtxXFMF function.

Comment

The Mtx structure looks like this:

typedef long  Mtx_t[4][4];
typedef union {
     Mtx_t          m;
     long long int  force_structure_alignment;
} Mtx;

See also

gSPMatrix, guMtxCatF, guMtxCatL, and guMtxXFMF

Revision history

03/01/99 Completely rewritten.