##### Ninja Library - Light Function

# njCnkSetEasyMultiLightPoint

Sets the light source direction for the chunk EasyMulti light (point light source)

### FORMAT

`

  void njCnkSetEasyMultiLightPoint( light, x, y, z )
  Int light
  float x
  float y
  float z

`

### PARAMETER

  `light` | Light number
  `x` | Light position (X)
  `y` | Light position (Y)
  `z` | Light position (Z)

### RETURN

  None

### DESCRIPTION

  Sets the position of the point light source for njCnkEasyMultiDrawObject (njCnkEasyMultiDrawModel).

  Enter the light number and positions to be used in the parameters.

  Example (point light source): njCnkSetEasyMultiLightPoint( NJD_CNK_EASY_MULTILIGHT_2, x, y, 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 );
      /* Set chunk light as 4 */
      njCnkSetEasyMultiLight( 4 );
      /* Set direction of chunk light's parallel light source (first light source) */
      njCnkSetEasyMultiLightVector(0.f, 0.f, -1.f);
      /* Set chunk light's point light source position */
      /* Set second light source (point light source) */
      njCnkSetEasyMultiLightPoint(NJD_CNK_EASY_MULTILIGHT_2, 0.f, 0.f, -12.f);
      /* Set third light source (point light source) */
      njCnkSetEasyMultiLightPoint(NJD_CNK_EASY_MULTILIGHT_3, 0.f, 0.f, -12.f);
      /* Set chunk light's point light source range (distance) */
      njCnkSetEasyMultiLightRange(NJD_CNK_EASY_MULTILIGHT_2, 6.f, 40.f);
      njCnkSetEasyMultiLightRange(NJD_CNK_EASY_MULTILIGHT_3, 6.f, 40.f);
      njCnkSetEasyMultiLightRange(NJD_CNK_EASY_MULTILIGHT_4, 6.f, 40.f);
      /* Set chunk light's ambient color */
      njCnkSetEasyMultiAmbient(0.1f, 0.1f, 0.1f);
      /* Set the chunk light's light source color */
      njCnkSetEasyMultiLightColor(NJD_CNK_EASY_MULTILIGHT_1, 0.6f, 0.5f, 0.3f);
      njCnkSetEasyMultiLightColor(NJD_CNK_EASY_MULTILIGHT_2, 1.f, 0.5f, 0.5f);
      njCnkSetEasyMultiLightColor(NJD_CNK_EASY_MULTILIGHT_3, 0.5f, 1.f, 0.5f);
      njCnkSetEasyMultiLightColor(NJD_CNK_EASY_MULTILIGHT_4, 0.5f, 0.5f, 1.f);
      	:
      njClearMatrix();
      /* Set chunk light direction-position reflection */
      njCnkSetEasyMultiLightMatrices();
      njTranslate( NULL, 0.f, 0.f, -10.f );
      njRotateXYZ( NULL, rx,ry,rz );
      njCnkEasyMultiDrawObject;

### NOTE

  The settings made using this function are reflected when `njCnkSetEasyMultiLightMatrices()` function is called.

### REFERENCE

  `njCnkEasyMultiDrawModel()
  njCnkEasyMultiDrawObject()
  njCnkSetEasyMultiAmbient()
  njCnkSetEasyMultiLight()
  njCnkSetEasyMultiLightColor()
  njCnkSetEasyMultiLightMatrices()
  njCnkSetEasyMultiLightRange()
  njCnkSetEasyMultiLightVector()
  njCnkSetEasyMultiLightSwitch()
  `

njCnkSetEasyMultiLightPoint

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999