A light subclassing from this has a color, a position and a radius.
First some terminology about all the several types of lights that Crystal Space supports:
Static light. This is a normal static light that cannot move and cannot change intensity/color. All lighting information from all static lights is collected in one static lightmap.
Pseudo-dynamic light. This is a static light that still cannot move but the intensity/color can change. The shadow information from every pseudo-dynamic light is kept in a seperate shadow-map. Shadowing is very accurate with pseudo-dynamic lights since they use the same algorithm as static lights.
Dynamic light. This is a light that can move and change intensity/color. These lights are the most flexible. All lighting information from all dynamic lights is collected in one dynamic lightmap (seperate from the pseudo-dynamic shadow-maps). Shadows for dynamic lights will be less accurate because things will not cast accurate shadows (due to computation speed limitations).
Note that static and pseudo-dynamic lights are represented by the same csStatLight class.
Constructor & Destructor Documentation
csLight::csLight (
float x,
float y,
float z,
float dist,
float red,
float green,
float blue )
Construct a light at a given position.
With a given radius, a given color, a given name and type. The light will not have a halo by default.
csLight::~csLight (
) [virtual]
Destroy the light.
Note that destroying a light may not have the expected effect. Static lights result in changes in the lightmaps. Removing them will not automatically update those lightmaps as that is a time-consuming process.
Note that setting the color of a light may not always have an immediate visible effect. Static lights are precalculated into the lightmaps and those lightmaps are not automatically updated when calling this function as that is a time consuming process.