class csLight : public csObject Superclass of all positional lights
| | AddReference () Add a reference to the halo |
| | CheckFlags (ULong to_check) Check if all the given flags are set. |
| | CorrectForNocolor (unsigned char* rp, unsigned char* gp, unsigned char* bp) Change the given r, g, b value to the current mixing mode (TRUE_RGB or NOCOLOR) |
| | CorrectForNocolor (float* rp, float* gp, float* bp) Change the given r, g, b value to the current mixing mode (TRUE_RGB or NOCOLOR) |
| | csLight (float x, float y, float z, float dist, float red, float green, float blue) Construct a light at a given position |
| | GetCenter () Get the center position |
| | GetColor () Get the light color |
| | GetFlags () Get flags. |
| | GetHaloInQueue () Query if the halo is in the queue |
| | GetHaloIntensity () Get the intensity of the halo |
| | GetHaloMaxIntensity () Return the maximum intensity of the halo |
| | GetRadius () Get the radius |
| | GetReferenceCount () Return the reference count |
| | GetSector () Get the current sector for this light |
| | GetSquaredRadius () Get the squared radius |
| | RemoveReference () Remove a reference to the halo |
| | SetColor (const csColor& col) Set the light color |
| | SetFlags (ULong mask, ULong value) Set all flags with the given mask. |
| | SetHaloInQueue (bool bNew) Set whether or not the halo is in the queue |
| | SetHaloIntensity (float newI) Set the intensity of the halo |
| | SetSector (csSector* sector) Set the current sector for this light |
| | ~csLight () Destroy the light |
| | center Position of the light. |
| | color Color. |
| | dist Radius of light. |
| | flags Set of flags |
| | halo_intensity the current intensity of the attached halo. |
| | halo_max_intensity the maximum intensity of the attached halo. |
| | halo_ref_count the reference count (for halo fading purposes). |
| | in_halo_queue whether this light is in the halo queue or not. |
| | sector Home sector of the light. |
| | sqdist Squared radius of light. |
Superclass of all positional lights. 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:
Note that static and pseudo-dynamic lights are represented by the same csStatLight class.
- 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).
csVector3 center
float dist
float sqdist
csColor color
float halo_intensity
float halo_max_intensity
int halo_ref_count
bool in_halo_queue
ULong flags
static int ambient_red
static int ambient_green
static int ambient_blue
static int ambient_white
csLight(float x, float y, float z, float dist, float red, float green, float blue)
virtual ~csLight()
void SetFlags(ULong mask, ULong value)
ULong GetFlags()
bool CheckFlags(ULong to_check)
virtual void SetSector(csSector* sector)
csSector* GetSector()
csVector3& GetCenter()
float GetRadius()
float GetSquaredRadius()
csColor& GetColor()
virtual void SetColor(const csColor& col)
float GetHaloMaxIntensity()
void SetHaloIntensity(float newI)
float GetHaloIntensity()
int GetReferenceCount()
void AddReference()
void RemoveReference()
void SetHaloInQueue(bool bNew)
bool GetHaloInQueue()
static void CorrectForNocolor(unsigned char* rp, unsigned char* gp, unsigned char* bp)
static void CorrectForNocolor(float* rp, float* gp, float* bp)
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de