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

- In the Ninja light model, light consists of three elements: specular light (highlighting), diffuse light (normal light), and ambient light (background light).
- This function sets the intensity (strength) of each of these elements.
  Ordinarly, settings are made in the range from 0.f to 1.f; however, values in excess of 1.f can be used according to conditions.

### 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|->