Ninja Library - Light Function

njSetLightDirection

Sets the direction of light that was set by the njCreateLight() function

FORMAT

void njSetLightDirection( *ptr, dx, dy, dz )
NJS_LIGHT *ptr
Float dx
Float dy
Float dz

PARAMETER

 *ptr  Pointer to light source 
 dx  X coordinate of light source 
 dy  Y coordinate of light source 
 dz  Z coordinate of light source 

RETURN

None

DESCRIPTION

Sets light direction with vector component (default is z axis direction).

EXAMPLE

#include <Shinobi.h>
	:
NJS_LIGHT light;
sbInitSystem( NJD_RESOLUTION_VGA, NJD_FRAMEBUFFER_MODE_RGB565, 1);
njCreateLight(&light, NJD_DIR_LIGHT);
	:
/* Set light direction vector of parallel light source to (1,0,0) */
njSetLightDirection(&light, 1.f, 0.f, 0.f);

NOTE

Light source needs to be designated in njCreateLight() function. Additionally, vector setting is standardized.

REFERENCE

njCreateLight()

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