#include <light.h>
Inheritance diagram for csLight:

Public Methods | |
| csLight (float x, float y, float z, float dist, float red, float green, float blue) | |
| Construct a light at a given position. More... | |
| virtual | ~csLight () |
| Destroy the light. More... | |
| unsigned long | GetLightID () |
| Get the ID of this light. | |
| virtual void | SetSector (csSector *sector) |
| Set the current sector for this light. | |
| csSector* | GetSector () const |
| Get the current sector for this light. | |
| void | SetCenter (const csVector3 &v) |
| Set the center position. | |
| const csVector3& | GetCenter () |
| Get the center position. | |
| float | GetRadius () const |
| Get the radius. | |
| float | GetSquaredRadius () const |
| Get the squared radius. | |
| float | GetInverseRadius () const |
| Get the inverse radius. | |
| void | SetRadius (float radius) |
| Set the radius. | |
| csColor& | GetColor () |
| Get the light color. | |
| virtual void | SetColor (const csColor &col) |
| Set the light color. More... | |
| csHalo* | GetHalo () |
| Return the associated halo. | |
| void | SetHalo (csHalo *Halo) |
| Set the halo associated with this light. | |
| int | GetAttenuation () |
| Get the light's attenuation type. | |
| void | SetAttenuation (int a) |
| Change the light's attenuation type. | |
| float | GetBrightnessAtDistance (float d) |
| Get the brightness of a light at a given distance. | |
| SCF_DECLARE_IBASE_EXT (csObject) | |
Public Attributes | |
| csFlags | flags |
| Set of flags. | |
| csLight::Light | scfiLight |
Static Public Attributes | |
| int | ambient_red |
| Config value: ambient red value. | |
| int | ambient_green |
| Config value: ambient green value. | |
| int | ambient_blue |
| Config value: ambient blue value. | |
Protected Attributes | |
| csSector* | sector |
| Home sector of the light. | |
| csVector3 | center |
| Position of the light. | |
| float | dist |
| Radius of light. | |
| float | sqdist |
| Squared radius of light. | |
| float | inv_dist |
| Inverse radius of light. | |
| csColor | color |
| Color. | |
| csHalo* | halo |
| The associated halo (if not NULL). | |
| int | attenuation |
| Attenuation type. | |
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:
|
|
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. |
|
|
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. |
|
|
Set the light color. 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. Reimplemented in csStatLight, and csDynLight. |