njSetLightAngle | Japanese
    <-|INDEX|->
Sets the limit angle of a light created with njCreateLight.

### FORMAT

      #include <NINJA.H>
      void njSetLightAngle( *ptr, iang, oang )
      NJS_LIGHT *ptr
      NJS_Angle iang
      NJS_Angle oang

### PARAMETERS

*ptr
  light pointer
iang
  limiting inside cone angle (circular angle)
oang
  limiting outside cone angle (circular angle)

### RETURN VALUE

  None

### ERROR VALUE

  None

### FUNCTION

- Sets the limit angle of spotlight and specular light sources defined with njCreateLight.
- An example would be a spotlight used to illuminate a stage.
- The light displayed on the stage is circular, but the light is attenuated gradually outside the light cone, rather than becoming dark abruptly.
- The iang parameter of this function sets the angle of the edge of the cone, or the angle at which attenuation of light begins.
- The angle through which attenuation takes place can never exceed 90 degrees, but calculation of attenuation close to 90 degrees becomes unmeaningful as the beam of the spotlight is tightened.
- The angle at which the calculation of attenuation is stopped (cut off)--i.e., the angle at which light disappears--is set by the oang parameter.

### EXAMPLE

      #include <NINJA.H>
      ...........

      NJS_LIGHT light;

      njInitSystem();
      njCreateLight(&light, NJD_SPEC_POINT);
      ...........
      /*
       *  Set inner limit angle of specular point light source to 30 degrees
       *  and output limit angle to 60 degrees
       */
      njSetLightAngle(&light, NJM_RAD_ANG(NJD_PI/6.f), NJM_RAD_ANG(NJD_PI/3.f));

### NOTES

- Before using this function, the light source must first be defined using njCreateLight.

### RELATED TOPICS

  njCreateLight()
  njSetLightRange()

njSetLightAngle |
    <-|INDEX|->