Ninja Library - View Function

njForwardViewAbsolute

Moves the view location in the direction of the view (Absolute move)

FORMAT

njForwardViewAbsolute( *v, x )
NJS_VIEW *v
Float x

PARAMETER

 *v  Pointer to view structure  
 x  Movement distance (absolute) 

RETURN

None

DESCRIPTION

Moves the view location in the direction of the view by an absolute amount.

EXAMPLE

The following moves the view located at (0, 0, 0) and directed toward 
(1, 1, -1) (toward the inside of the upper right of the screen) by 10 
in the direction of the view.

#define VIEW_APX 0.f
#define VIEW_APY 0.f
#define VIEW_APZ 0.f
#define VIEW_AVX 1.f
#define VIEW_AVY 1.f
#define VIEW_AVZ -1.f
#define VIEW_AROLL 0
NJS_VIEW v;
v.apx = VIEW_APX;
v.apy = VIEW_APY;
v.apz = VIEW_APZ;
v.avx = VIEW_AVX;
v.avy = VIEW_AVY;
v.avz = VIEW_AVZ;
v.aroll = NJM_DEG_ANG(VIEW_AROLL);
njUnitViewVector( &v );
njForwardViewAbsolute(&v, 10.f);
njSetView( &v );
njClearMatrix();

NOTE

When parameter v is NULL, this function acts on the current view.

REFERENCE

njUnitViewVector()
njSetView()
njClearMatrix()

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