njForwardViewAbsolute Japanese
<-|INDEX|->
Moves the view location in the direction of the view. (Absolute move)

FORMAT

#include <Ninja.h>

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

PARAMETERS

*v
view structure pointer
x
movement distance (absolute)

RETURN VALUE

None

FUNCTION


EXAMPLE

This example 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);

njUnitCurrentViewVector(&v);
njForwardViewAbsolute(&v, 10.f);
njSetView(&v);
njClearMatrix();

NOTES


RELATED TOPICS

njUnitCurrentViewVector()
njSetView()
njClearMatrix()

njForwardViewAbsolute
<-|INDEX|->

Copyright SEGA ENTERPRISES, LTD., 1997