CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File 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 AddAffectedLightingInfo (iLightingInfo *li)
 Add a lighting info to this dynamic light. More...

void RemoveAffectedLightingInfo (iLightingInfo *li)
 Remove a lighting info from this dynamic light. More...


Public Attributes

csDynLight::eiDynLight scfiDynLight
 iDynLight implementation. More...


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.

Definition at line 505 of file csengine/light.h.


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.

virtual 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::AddAffectedLightingInfo iLightingInfo   li
 

Add a lighting info to this dynamic light.

This is usually called during Setup() by meshes that are hit by the dynamic light.

void csDynLight::RemoveAffectedLightingInfo iLightingInfo   li
 

Remove a lighting info from this dynamic light.

virtual 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.


Member Data Documentation

csDynLight::eiDynLight csDynLight::scfiDynLight
 

iDynLight implementation.

Referenced by csDynLight::eiDynLight::GetNext.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14