njRotateViewXYZ Japanese
<-|INDEX|->
Rotates the view around the X, Y, and Z axes (absolute rotation).

FORMAT

#include <Ninja.h>

void njRotateViewXYZ(*v, angx, angy, angz)
NJS_VIEW *v
Angle angx
Angle angy
Angle angz

PARAMETERS

NJS_VIEW *v
view structure pointer
Angle angx
rotation angle with respect to X axis (absolute amount of rotation)
Angle angy
rotation angle with respect to Y axis (absolute amount of rotation)
Angle angz
rotation angle with respect to Z axis (absolute amount of rotation)

RETURN VALUE

None

FUNCTION


EXAMPLE

The following rotates the view located at (0, 0, 3000) with orientation (0, 0, -1) (screen rear) by 30 degrees around the X axis, 60 degrees around the Y axis, and 90 degrees around the Z axis.
#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);

njSetView(&v);
njRotateViewXYZ(&v, NJM_DEG_ANG(30), NJM_DEG_ANG(60), NJM_DEG_ANG(90));
njClearMatrix();

NOTES


RELATED TOPICS

njSetView()
njClearMatrix()
NJM_DEG_ANG()

njRotateViewXYZ
<-|INDEX|->

Copyright SEGA ENTERPRISES, LTD., 1997