njSetLightIntensity Japanese
<-|INDEX|->
Sets the intensity of light defined using njCreateLight.

FORMAT

#include <NINJA.H> 
void njSetLightIntensity( *ptr, spc, dif, amb )
NJS_LIGHT *ptr
Float spc
Float dif
Float amb

PARAMETERS

*ptr
light pointer
spc
specular light intensity
dif
diffuse light intensity
amb
ambient light intensity

RETURN VALUE

None

ERROR VALUE

None

FUNCTION


EXAMPLE

#include <NINJA.H> 
...........

NJS_LIGHT light;

njInitSystem();
njCreateLight(&light, NJD_SPEC_DIR);
...........
/* Set intensity of specular diffuse parallel light source to 0.5f */
njSetLightIntensity(&light, 0.5f, 0.5f, 0.f);

NOTES

Before using this function, the light source must first be defined using njCreateLight. It is not mandatory that intensity of each element of the specified light be set, in which case the intensity calculation is ignored. For instance, in the example above, setting 0.5f instead of 0.f as the 4th parameter of njSetLightIntensity will have no effect on this light source.

RELATED TOPICS

njCreateLight()

njSetLightIntensity
<-|INDEX|->

Copyright SEGA ENTERPRISES, LTD., 1997