Ninja Library - Light Function

njTranslateLight

Moves a light matrix according to X, Y, and Z components

FORMAT

void njTranslateLight( *ptr, tx, ty, tz )
NJS_LIGHT *ptr
Float tx
Float ty
Float tz

PARAMETER

 *ptr  Pointer to light source 
 tx  Movement in X-axis direction 
 ty  Movement in Y-axis direction 
 tz  Movement in Z-axis direction 

RETURN

None

DESCRIPTION

Parallel movement of registered light source matrix to the elements of X, Y and Z according to njCreateLight. Position and direction of the light source are calculated.

EXAMPLE

#include <Shinobi.h>
	:
NJS_LIGHT light;
sbInitSystem( NJD_RESOLUTION_VGA, NJD_FRAMEBUFFER_MODE_RGB565, 1);
njCreateLight(&light, NJD_POINT_LIGHT);
	:
njClearMatrix;
/* Movemnet of element (10, 0, -10) */
njTranslateLight(&light, 10.f, 0.f, -10.f);

NOTE

Light source needs to be specified in njCreateLight() and njClearMatrix() needs to be called beforehand.

REFERENCE

njCreateLight()

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