guPositionF

guPositionF [Function]

Function

guPosition

Creates a rotation/parallel translation modeling matrix (floating point)

Syntax

#include <ultra64.h>        /* gu.h */
void guPositionF(
        float mf[4][4],
        float r,
        float p,
        float h,
        float s,
        float x,
        float y,
        float z);

Arguments

mf
The resulting 4x4 matrix
r
Angle of rotation of roll (in degrees, x-axis)
p
Angle of rotation of pitch (in degrees, y-axis)
h
Angle of rotation of heading, or yaw (in degrees, z-axis)
s
Scale by factor s
x
Amount of translation along x-axis
y
Amount of translation along y-axis
z
Amount of translation along z-axis

Returned value

None

Description

Scales by s the object rotated according to (r, p, h) and returns to mf the modeling matrix translated by (x, y, z). When this function is called, the result is the creation of the following kind of modeling matrix:

Fixed point is handled with the guPosition function.

Note

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

See also

guAlign, guAlignF, guPosition, guRotate, guRotateF, guScale, guScaleF, guTranslate, and guTranslateF

Revision history

03/01/99 Completely rewritten.