Ninja Library - Matrix Function

njRotateX

Applies a matrix that gives a rotation around the X axis

FORMAT

void njRotateX(*m, ang)
NJS_MATRIX *m
Angle ang

PARAMETER

 *m  Destination matrix 
 ang  Rotation angle 

RETURN

None

DESCRIPTION

Applies a matrix that gives rotation around the X axis to the matrix m. When parameter m is NULL, the current matrix will be the destination.

EXAMPLE

The following applies a matrix that gives rotation by 90 degrees 
around the X axis to the current matrix.

NJS_MATRIX stack[10];
NJS_VIEW view;
njInitMatrix(stack, 10);
njInitView(&view);
njSetView(&view);
njClearMatrix();
njPushMatrix(NULL);
njRotateX(NULL, NJM_DEG_ANG(90));
njPopMatrix(1);

NOTE

For a matrix [M] and multiplicative rotational matrix [R], [M] = [R] * [M]. Care must be taken with the order in which matrices are multiplied.

njRotateX
COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999