##### Ninja Library - Light Function

# njSetEasyLight

Sets easy light

### FORMAT

`

  void njSetEasyLight( x, y, z )
  FLoat x, y, z

`

### PARAMETER

  `x, y, z` | Light vectors

### RETURN

  None

### DESCRIPTION

  Sets the light for the njEasyDrawObject(njEasyDrawModel) function. The vector coordinate system is fixed to the screen. For example, a setting such as njSetEasyLight( 0.0f, 0.0f, 1.0f ); causes the light to always come from the front side of the screen. To obtain a coordinate system in a 3D space, perform conversion with the current matrix. light.x = LIGHT3D_X;
  light.y = LIGHT3D_Y;
  light.z = LIGHT3D_Z;
  njCalcVector( NULL, &light, &lwork );
  njSetEasyLight( lwork.x, lwork.y, lworkz );
  This will result in the light source emerging from a 3D space (LIGHT3D_X,LIGHT3D_Y,LIGHT3D_Z).

### 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()
  njSetEasyLightIntensity()
  njSetEasyLightColor()
  `

njSetEasyLight

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999