Ninja Library - Matrix Function

njCalcPoint

Performs matrix conversion for an arbitrary point

FORMAT

void njCalcPoint(*m, *ps, *pd)
NJS_MATRIX *m
NJS_POINT3 *ps
NJS_POINT3 *pd

PARAMETER

 *m  Calculation matrix 
 *ps  Arbitrary point 
 *pd  Point after conversion 

RETURN

None

DESCRIPTION

Performs matrix conversion for arbitrary point *ps, then stores the coordinates after conversion in *pd. When parameter *m is NULL, the current matrix is used for processing.

EXAMPLE

The following rotates point ps(100, 0, 0) by 45 degrees around the Y axis.
NJS_MATRIX m;
NJS_POINT3 ps, pd;
ps.x = 100.f;
ps.y = 0.f;
ps.z = 0.f;
njUnitMatrix(&m);
njRotateY(&m, NJM_DEG_ANG(45));
njCalcPoint(&m, &ps, &pd);
% result %
pd(70.710701, 00.000000, -70.710701)

NOTE

Results carried out with a matrix that inherited the base matrix are returned not as Ninja coordinates but as hardware coordinates.

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