Ninja Library - Light Function

njSetEasyLightIntensity

Sets easy light intensity

FORMAT

void njSetEasyLightIntensity( diff, ambi )
float diff
float ambi

PARAMETER

 diff  Diffuse intensity 
 ambi  Ambient intensity 

RETURN

None

DESCRIPTION

Sets the light intensity for the njEasyDrawObject(njEasyDrawModel) function. njSetEasyLightIntensity( 1.0f, 0.0f );
In this case, the spot at the opposite of 90 degrees from the light is fully dark. Therefore, a certain amount of ambient light should always be set. njSetEasyLightIntensity( 1.0f, 0.2f );
In this case, the image does get darker than 20%. njSetEasyLightIntensity( 0.0f, 1.0f );
With 100% for both items, there is no shadow.

EXAMPLE

sbInitSystem( NJD_RESOLUTION_640x240_NTSCNI, NJD_FRAMEBUFFER_MODE_RGB565, 1 );
njInitVertexBuffer( 1000000, 0, 1000, 0, 0 );
njInitMatrix( matrix, 8 , 0);
njInit3D( vbuf, 4096 );
njInitView( &view );
njSetView( &view );
njSetEasyLight( 0.f, 0.f, 1.0f );
njSetEasyLightIntensity( 1.0f, 0.0f );
njSetEasyLightColor( 1.0f, 1.0f, 1.0f );
njClearMatrix();
njTranslate( NULL, 0.f, 0.f, -10.f );
njRotateXYZ( NULL, rx,ry,rz );
njEasyDrawObject( object );

REFERENCE

njEasyDrawModel()
njEasyDrawObject()
njSetEasyLight()
njSetEasyLightColor()

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