njTranslateViewRelative Japanese
<-|INDEX|->
Translates the view along the X, Y, and Z axes (relative translation).

FORMAT

#include <Ninja.h>

void njTranslateViewRelative( *v , x , y , z )
NJS_VIEW *v
Float x
Float y
Float z

PARAMETERS

NJS_VIEW *v
view structure pointer
Float x
amount of translation along X axis (relative amount of translation)
Float y
amount of translation along Y axis (relative amount of translation)
Float z
amount of translation along Z axis (relative amount of translation)

RETURN VALUE

None

FUNCTION


EXAMPLE

The following translates the view located at (0, 0, 3000) and directed toward (0, 0, -1) (to rear of screen) by 100 in the X direction, 200 in the Y direction, and 300 in the Z 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);

njTranslateViewRelative(&v, 100.f, 200.f, 300.f);
njSetView(&v);
njClearMatrix();

NOTES


RELATED TOPICS

njInitView()
njSetView()
njClearMatrix()

njTranslateViewRelative
<-|INDEX|->

Copyright SEGA ENTERPRISES, LTD., 1997