Ninja Library - Light Function

njUnitLightMatrix

Converts a light matrix into a unit matrix

FORMAT

void njUnitLightMatrix( *ptr )
NJS_LIGHT *ptr

PARAMETER

 *ptr  Pointer to light source 

RETURN

None

DESCRIPTION

Converts a lights matrix registered by njCreateLight() into a unit matrix, enabling calculation of the position and direction of the light source.

EXAMPLE

#include <Shinobi.h>
	:
NJS_LIGHT light;
sbInitSystem( NJD_RESOLUTION_VGA, NJD_FRAMEBUFFER_MODE_RGB565, 1);
njCreateLight(&light, NJD_POINT_LIGHT);
	:
njClearMatrix();
/* Make light matrix the unit matrix */
njUnitLightMatrix(&amp;light);

NOTE

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

REFERENCE

njCreateLight()

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