Ninja Library - Matrix Function

njTranslateV

Moves a matrix laterally

FORMAT

void njTranslateV(*m, *v)
NJS_MATRIX *m
NJS_VECTOR *v

PARAMETER

 *m  Matrix to be moved 
 *v  Amount of movement along the various axes 

RETURN

None

DESCRIPTION

Moves arbitrary matrix m laterally. When parameter m is NULL, the current matrix is moved.

EXAMPLE

The following moves the current matrix by 10 along the X axis, 
20 along the Y axis, and 30 along the Z axis.

NJS_MATRIX stack[10];
NJS_VIEW view;
NJS_VECTOR v;
v.x = 10.f;
v.y = 20.f;
v.z = 30.f;
njInitMatrix(stack, 10);
njInitView(&view);
njSetView(&view);
njClearMatrix();
njPushMatrix(NULL);
njTranslateV(NULL, &v);
njPopMatrix(1);

NOTE

For matrix [M] and matrix translated through multiplication [T], [M] = [T] * [M]. Care must be taken with the order in which matrices are multiplied.

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