SG_Light * SG_LightNew (SG_Node *parent, const char *name)
void SG_LightAmbient (SG_Light *lt, M_Color c)
void SG_LightDiffuse (SG_Light *lt, M_Color c)
void SG_LightSpecular (SG_Light *lt, M_Color c)
void SG_LightSpot (SG_Light *lt, M_Real cutoff, M_Real exponent, M_Vector3 dir)
|
The
SG_LightNew() function allocates, initializes, and attaches a
SG_Light object.
The functions
SG_LightAmbient(), SG_LightDiffuse() and
SG_LightSpecular() configure the colors associated with the ambient, diffuse and specular
components of the light source.
SG_LightSpot() sets the spot parameters of the light source.
cutoff specifies the cutoff angle in degrees,
exponent specifies the light intensity (the higher the exponent, the more focused
the light source; a value of 0 provides uniform distribution), and
dir is the direction vector.
If the cutoff angle is < 180 degrees, the light source is directional,
otherwise it is treated as a point source and the direction vector
is ignored.
|