##### Ninja Library - Light Function

# njCnkSetSimpleMultiLight

Sets chunk SimpleMulti light

### FORMAT

`

  void njCnkSetSimpleMultiLight( num )
  Int num

`

### PARAMETER

  `num` | Registered number of color

### RETURN

  None

### DESCRIPTION

  Sets the light for njCnkSimpleMultiDrawObject (njCnkSimpleMultiDrawModel).

  Enter the number of lights to be used for the parameters. However, the relation between number of lights and light types is as follows.

  No. lights/No. | No.1 | NO.2 | No.3 | No.4
  1 | Parallel light source |  |  |
  2 | Parallel light source | Point light source |  |
  3 | Parallel light source | Point light source | Point light source |
  4 | Parallel light source | Point light source | Point light source | Point light source

### 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 );
      /* Set chunk light as 4 */
      njCnkSetSimpleMultiLight( 4 );
      /* Set direction of chunk light's parallel light source (first light source) */
      njCnkSetSimpleMultiLightVector(0.f, 0.f, -1.f);
      /* Set chunk light's point light source position */
      /*  Set second light source (point light source) */
      njCnkSetSimpleMultiLightPoint(NJD_CNK_EASY_MULTILIGHT_2, 0.f, 0.f, -12.f);
      /* Set third light source (point light source) */
      njCnkSetSimpleMultiLightPoint(NJD_CNK_EASY_MULTILIGHT_3, 0.f, 0.f, -12.f);
      /* Set chunk light's point light source range (distance) */
      njCnkSetSimpleMultiLightRange(NJD_CNK_EASY_MULTILIGHT_2, 6.f, 40.f);
      njCnkSetSimpleMultiLightRange(NJD_CNK_EASY_MULTILIGHT_3, 6.f, 40.f);
      njCnkSetSimpleMultiLightRange(NJD_CNK_EASY_MULTILIGHT_4, 6.f, 40.f);
      /* Set chunk light's ambient color */
      njCnkSetSimpleMultiAmbient(0.1f, 0.1f, 0.1f);
      /* Set the chunk light's light source color */
      njCnkSetSimpleMultiLightColor(NJD_CNK_EASY_MULTILIGHT_1, 0.6f, 0.5f, 0.3f);
      njCnkSetSimpleMultiLightColor(NJD_CNK_EASY_MULTILIGHT_2, 1.f, 0.5f, 0.5f);
      njCnkSetSimpleMultiLightColor(NJD_CNK_EASY_MULTILIGHT_3, 0.5f, 1.f, 0.5f);
      njCnkSetSimpleMultiLightColor(NJD_CNK_EASY_MULTILIGHT_4, 0.5f, 0.5f, 1.f);
      	:
      njClearMatrix();
      /* Set chunk light direction-position reflection */
      njCnkSetSimpleMultiLightMatrices();
      njTranslate( NULL, 0.f, 0.f, -10.f );
      njRotateXYZ( NULL, rx,ry,rz );
      njCnkSimpleMultiDrawObject;

### REFERENCE

  `njCnkSimpleMultiDrawModel()
  njCnkSimpleMultiDrawObject()
  njCnkSetSimpleMultiAmbient()
  njCnkSetSimpleMultiLightColor()
  njCnkSetSimpleMultiLightMatrices()
  njCnkSetSimpleMultiLightPoint()
  njCnkSetSimpleMultiLightRange()
  njCnkSetSimpleMultiLightVector()
  njCnkSetSimpleMultiLightSwitch()
  `

njCnkSetSimpleMultiLight

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999