Ninja Library - View Function

njRotateViewPosYRelative

Rotates the view location around the Y axis (relative rotation)

FORMAT

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

PARAMETER

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

RETURN

None

DESCRIPTION

Rotates the view location around the Y axis by a relative angle.

EXAMPLE

The following rotates the location of the view located at (0, 0, 3000) 
and directed towarded (0, 0, -1) (behind the screen) by 90 degrees around the Y axis
without changing the view direction.
#define VIEW_PX 0.f
#define VIEW_PY 0.f
#define VIEW_PZ 3000.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);
njRotateViewPosYRelative(&v, NJM_DEG_ANG(90));
njSetView( &v );

NOTE

When parameter v is NULL, the current view is rotated.

REFERENCE

njSetView()

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