njLookAtViewV Japanese
<-|INDEX|->
Changes the view direction towards point (x, y, z).

FORMAT

#include <Ninja.h>

void njLookAtViewV( *v, *p )
NJS_VIEW   *v
NJS_POINT3 *p

PARAMETERS

*v
view structure pointer
*p
coordinates of point to which view is to be directed

RETURN VALUE

None

FUNCTION


EXAMPLE

The following changes the direction of the view located at (500, 500, 500) and directed toward (0, 0, -1) (to rear of screen) toward the origin (0, 0, 0).
#define VIEW_PX 500.f
#define VIEW_PY 500.f
#define VIEW_PZ 500.f
#define VIEW_VX 0.f
#define VIEW_VY 0.f
#define VIEW_VZ -1.f
#define VIEW_ROLL 0

NJS_VIEW v;
NJS_POINT3 p;

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

p.x = 0.f;
p.y = 0.f;
p.z = 0.f;

njLookAtViewRelative(&v, &p);
njSetView(&v);
njClearMatrix();

NOTES

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

RELATED TOPICS

InitView()
njSetView()
njClearMatrix()

njLookAtViewV
<-|INDEX|->

Copyright SEGA ENTERPRISES, LTD., 1997