Ninja Library - View Function

njRotateViewZ

Rotates the view location around the Z axis (absolute rotation)

FORMAT

void njRotateViewZ( *v, ang )
NJS_VIEW *v
Angle ang

PARAMETER

 *v  Pointer to view structure 
 ang  Rotation angle (absolute amount) 

RETURN

None

DESCRIPTION

Rotates the view around the Z axis.

EXAMPLE

The following rotates the view located at (0, 0, 3000) 
with orientation (0, 0, -1) (behind the screen) by 90 degrees around the Z axis.
#define VIEW_PX 3000.f
#define VIEW_PY 0.f
#define VIEW_PZ 0.f
#define VIEW_VX 0.f
#define VIEW_VY 0.f
#define VIEW_VZ -1.f
#define VIEW_ROLL 0
NJS_VIEW v;
v.px = VIEW_PX;
v.py = VIEW_PY;
v.pz = VIEW_PZ;
v.vx = VIEW_VX;
v.vy = VIEW_VY;
v.vz = VIEW_VZ;
v.roll = NJM_DEG_ANG(VIEW_ROLL);
njSetView(&v);
njRotateViewZ(&v, NJM_DEG_ANG(90));
njClearMatrix();

NOTE

When parameter v is NULL, the current matrix is rotated. There are two types in moving and rotating view location; absolute one by operating view matrix of view structure and relative one by operating each member of position(px, py, pz), direction(vx, vy, vz) and angle (roll) of view. However, this function is the first absolute operation. Refer to Readme.txt of view function for more details.

** Important **

This function is not deleted to keep compatible with Ninja program before SDK Ver. 0.15. When programs are written newly, do not use this function as it may be eliminated in the future.


REFERENCE

njSetView()
njClearMatrix()

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