guRotateRPY

guRotateRPY [Function]

Function

guRotateRPY

Creates a rotation modeling matrix (fixed point)

Syntax

#include <ultra64.h>        /* gu.h */
void guRotateRPY(Mtx *m, float r, float p, float y);

Arguments

m
Pointer to the matrix resulting from the calculations
r
Angle of rotation of roll (in degrees, x-axis)
p
Angle of rotation of pitch (in degrees, y-axis)
y
Angle of rotation of yaw (in degrees, z-axis)

Returned value

None.

Description

Returns a modeling matrix rotated according to (r, p, y) to the structure indicated by m. When this function is called, the result is the creation of the following kind of modeling matrix:

For details about the fixed-point format, see gSPMatrix. Floating point is handled with the guRotateRPYF function.

Note

An angle with a positive value represents counter-clockwise rotation. Be careful about the corresponding axis and the order of rotation.

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, guAlign, guAlignF, guPosition, guPositionF, guRotate, guRotateF, guRotateRPYF, guScale, guScaleF, guTranslate, and guTranslateF

Revision History

03/01/99 Completely rewritten.