Ninja Library - Matrix Function

njScaleV

Scales a matrix

FORMAT

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

PARAMETER

 *m  Calculation matrix 
 *v  Scaling ratio along the X, Y, and Z axes 

RETURN

None

DESCRIPTION

Scales arbitrary matrix m. When parameter m is NULL, the current matrix is scaled.

EXAMPLE

The following scales the current matrix by 0.5 along the X axis, 
1 along the Y axis, and 2 along the Z axis.

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

NOTE

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

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