| # EZ_DefineLightSrc

##

##

##

##

##

    NAME
           EZ_DefineLightSrc,  EZ_BindLightSrc  - define light source
           parameters

    SYNOPSIS
           #include <EZ.h>

           EZ_LightSrc *EZ_DefineLightSrc(float *parameters)
           void EZ_BindLightSrc(int num, EZ_LightSrc *lsrc)

    ARGUMENTS
           parameters  Specifies light source properties.

           num Specifies a light source, must be an integer between 0
           and 7.

           lsrc Specifies a pre-defined light source.

    DESCRIPTION
           EZ_DefineLightSrc  defines  a  light  source  based on the
           specified parameters. The defined light source  can  later
           be binded to one of the 8 light sources.

           parameters  specifies  an  array of floating point symbols
           and values  that  defines  the  light  source  properties.
           parameters  must  contain  a sequence of lighting symbols,
           each followed by the appropriate number of floating  point
           values.   The  last  symbol  must  be  EZ_NULL_F, which is
           itself not followed by any values.

           The symbols are:

              EZ_POSITION_F  specifies  the  position  of  the  light
              source,  must followed by 4 floating point numbers that
              defines the position of the light source.

              EZ_AMBIENT_F specifies the ambient color of  the  light
              source,  must  followed  by 4 floats in the range [0.0,
              1.0] that specify the intensity of the RGBA  components
              of the color.

              EZ_DIFFUSE_F  specifies  the diffuse color of the light
              source, must followed by 4 floats in  the  range  [0.0,
              1.0]  that specify the intensity of the RGBA components
              of the color.

              EZ_SPECULAR_F specifies the specular color of the light
              source,  must  followed  by 4 floats in the range [0.0,
              1.0] that specify the intensity of the RGBA  components
              of the color.

              EZ_SPOT_DIRECTION_F  specifies  the spot direction of a
              spot light source, must followed by 4 floats that spec-
              ify the spot direction.

              EZ_SPOT_EXPONENT_F  specifies  the  spot exponent, must
              followed by a non-negative floating point  number  that
              specifies the spot exponent.

              EZ_SPOT_CUTOFF_F  specifies the spot cutoff angle, must
              followed by an angle in degrees between 0.0 and  180.0.

              EZ_CONSTANT_ATTENUATION_F specifies the constant atten-
              uation coefficient, must followed by a  floating  point
              number that specifies the attenuation factor.

              EZ_LINEAR_ATTENUATION_F  specifies  the linear attenua-
              tion coefficient, must followed  by  a  floating  point
              number that specifies the attenuation factor.

              EZ_QUADRATIC_ATTENUATION_F   specifies   the  quadratic
              attenuation coefficient, must followed  by  a  floating
              point number that specifies the attenuation factor.

           EZ_BindLightSrc  binds  the  specified  pre-defined  light
           source property to the specified light source.

    SEE ALSO
           EZ_DefineMaterial(3), EZ_DefineLightModel(3), EZ_BindMaterial(3)
           , EZ_BindLightModel(3)