Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

csDynLight Class Reference

Class for a dynamic light. More...

#include <light.h>

Inheritance diagram for csDynLight:

csLight csObject iObject iBase List of all members.

Public Methods

 csDynLight (float x, float y, float z, float dist, float red, float green, float blue)
 Create a new dynamic light at the given position and with the given radius and color. More...

virtual ~csDynLight ()
 Remove the dynamic light from all polygons (i.e. More...

void Setup ()
 Initial placement of the light. More...

virtual void SetColor (const csColor &col)
 Call this when the color of the light changes. More...

void UnlinkLightpatch (csLightPatch *lp)
 Unlink a light patch from the light patch list. More...

void AddLightpatch (csLightPatch *lp)
 Add a light patch to the light patch list.

void SetNext (csDynLight *n)
void SetPrev (csDynLight *p)
csDynLight* GetNext ()
csDynLight* GetPrev ()
 SCF_DECLARE_IBASE_EXT (csLight)

Public Attributes

csDynLight::eiDynLight  scfiDynLight

Friends

class  eiDynLight

Detailed Description

Class for a dynamic light.

These lights only cast shadows for sectors/portals and not for things. However, they can freely move and change color intensity.


Constructor & Destructor Documentation

csDynLight::csDynLight ( float x,
float y,
float z,
float dist,
float red,
float green,
float blue )
 

Create a new dynamic light at the given position and with the given radius and color.

Initially the light will not be visible. You need to set the current sector and call 'Setup()' first.

csDynLight::~csDynLight ( ) [virtual]
 

Remove the dynamic light from all polygons (i.e.

remove all light patches) and then destroy the light itself.


Member Function Documentation

void csDynLight::SetColor ( const csColor & col ) [virtual]
 

Call this when the color of the light changes.

This is more efficient than calling Setup().

Reimplemented from csLight.

void csDynLight::Setup ( )
 

Initial placement of the light.

This routine generates a view frustum as seen from the light. The clipped polygons that result from this are light patches and are put in the lightpatches list. This routine needs to be called whenever the light moves.

void csDynLight::UnlinkLightpatch ( csLightPatch * lp )
 

Unlink a light patch from the light patch list.

Warning! This function does not test if the light patch is really on the list!


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000