##### Ninja Library - Light Structure

# NJS_LIGHT_ATTR, *NJS_LIGHT_ATTR_PTR

Structure that stores light source attributes

### DEFINITION

      typedef struct {
       Int  lsrc;
       Float  iamb;
       Float  idif;
       Float  ispc;
       Float  nrang;
       Float  frang;
       void*  func;
       Angle  iang;
       Angle  oang;
       NJS_ARGB argb;
      } NJS_LIGHT_ATTR, *NJS_LIGHT_ATTR_PTR;

### MEMBER

  `lsrc` | Light source type
  `iamb` | Ambient light intensity
  `idif` | Diffuse light intensity
  `ispc` | Specular intensity
  `nrang` | Distance at which light source distance attenuation begins
  `frang` | Distance at which light source results are cut
  `func` | User-specified light
  `iang` | Angle at which specular or spotlight is at maximum intensity
  `oang` | Angle at which specular or spotlight effect disappears
  `argb` | Light source color

### DESCRIPTION

  Structure that stores light source attributes.

  Member Isrc which specifies light source type takes the following values.

  0x01 | NJD_AMBIENT
  0x02 | NJD_DIR_LIGHT
  0x03 | NJD_LAMBERT_DIR
  0x04 | NJD_POINT_LIGHT
  0x05 | NJD_LAMBERT_POINT
  0x08 | NJD_SPOT_LIGHT
  0x10 | NJD_SPEC_DIR
  0x13 | NJD_PHONG_DIR
  0x20 | NJD_SPEC_POINT
  0x25 | NJD_PHONG_POINT
  0x40 | NJD_USER_LIGHT
  0x80 | NJD_SIMPLE_LIGHT
  0xC0 | NJD_BLOCK_LIGHT

### NOTE

  This structure is never set at the user level.

NJS_LIGHT_ATTR, *NJS_LIGHT_ATTR_PTR

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999