iLight Struct Reference
[Lighting]
The iLight interface is the SCF interface for the csLight class.
More...
#include <iengine/light.h>
Inheritance diagram for iLight:

Public Member Functions | |
virtual void | AddAffectedLightingInfo (iLightingInfo *li)=0 |
Add a mesh to this light. | |
virtual iCrossHalo * | CreateCrossHalo (float intensity, float cross)=0 |
Create a cross halo for this light. | |
virtual iFlareHalo * | CreateFlareHalo ()=0 |
Create a flare halo for this light. | |
virtual iNovaHalo * | CreateNovaHalo (int seed, int num_spokes, float roundness)=0 |
Create a nova halo for this light. | |
virtual const csVector3 & | GetAttenuationConstants () const =0 |
Get attenuation constants. | |
virtual csLightAttenuationMode | GetAttenuationMode () const =0 |
Return current attenuation mode. | |
virtual float | GetBrightnessAtDistance (float d) const =0 |
Get the brightness of a light at a given distance. | |
virtual const csVector3 & | GetCenter () const =0 |
Get the position of this light (local transformation relative to whatever parent it has). | |
virtual const csColor & | GetColor () const =0 |
Get the diffuse color of this light. | |
virtual float | GetCutoffDistance () const =0 |
Get the the maximum distance at which the light is guranteed to shine. | |
virtual float | GetDirectionalCutoffRadius () const =0 |
Get radial cutoff distance for directional lights. | |
virtual csLightDynamicType | GetDynamicType () const =0 |
Get the dynamic type of this light. | |
virtual csFlags & | GetFlags ()=0 |
Get flags for this light. | |
virtual const csVector3 | GetFullCenter () const =0 |
Get the position of this light. | |
virtual iBaseHalo * | GetHalo () const =0 |
Return the associated halo. | |
virtual iLightCallback * | GetLightCallback (int idx) const =0 |
Get the specified light callback. | |
virtual int | GetLightCallbackCount () const =0 |
Get the number of light callbacks. | |
virtual const char * | GetLightID ()=0 |
Get the id of this light. This is a 16-byte MD5. | |
virtual uint32 | GetLightNumber () const =0 |
Return a number that changes when the light changes (color, or position). | |
virtual iMovable * | GetMovable ()=0 |
Get the movable for this light. | |
virtual iSector * | GetSector ()=0 |
Get the sector for this light. | |
virtual const csColor & | GetSpecularColor () const =0 |
Get the specular color of this light. | |
virtual void | GetSpotLightFalloff (float &inner, float &outer) const =0 |
Get spot light falloff angles. | |
virtual csLightType | GetType () const =0 |
Get the light type of this light. | |
virtual iObject * | QueryObject ()=0 |
Get the iObject for this light. | |
virtual iSceneNode * | QuerySceneNode ()=0 |
Get the scene node that this object represents. | |
virtual void | RemoveAffectedLightingInfo (iLightingInfo *li)=0 |
Remove a mesh from this light. | |
virtual void | RemoveLightCallback (iLightCallback *cb)=0 |
Remove a light callback. | |
virtual void | SetAttenuationConstants (const csVector3 &constants)=0 |
Set attenuation constants. | |
virtual void | SetAttenuationMode (csLightAttenuationMode a)=0 |
Set attenuation mode. | |
virtual void | SetCenter (const csVector3 &pos)=0 |
Set the position of this light. | |
virtual void | SetColor (const csColor &col)=0 |
Set the diffuse color of this light. | |
virtual void | SetCutoffDistance (float distance)=0 |
Set the the maximum distance at which the light is guranteed to shine. | |
virtual void | SetDirectionalCutoffRadius (float radius)=0 |
Set radial cutoff distance for directional lights. | |
virtual void | SetLightCallback (iLightCallback *cb)=0 |
Set the light callback. | |
virtual void | SetSpecularColor (const csColor &col)=0 |
Set the specular color of this light. | |
virtual void | SetSpotLightFalloff (float inner, float outer)=0 |
Set spot light falloff angles. | |
virtual void | SetType (csLightType type)=0 |
Set the light type of this light. | |
virtual void | Setup ()=0 |
For a dynamic light you need to call this to do the actual lighting calculations. |
Detailed Description
The iLight interface is the SCF interface for the csLight class.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 separate 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 (separate 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).
Main creators of instances implementing this interface:
Main ways to get pointers to this interface:
- iEngine::FindLight()
- iEngine::FindLightID()
- iEngine::GetLightIterator()
- iEngine::GetNearbyLights()
- iLightList::Get()
- iLightList::FindByName()
- iLoaderContext::FindLight()
Main users of this interface:
Definition at line 233 of file light.h.
Member Function Documentation
|
Add a mesh to this light. This is usually called during Setup() by meshes that are hit by the light. |
|
Create a cross halo for this light.
|
|
Create a flare halo for this light.
|
|
Create a nova halo for this light.
|
|
Get attenuation constants.
|
|
Return current attenuation mode.
|
|
Get the brightness of a light at a given distance.
|
|
Get the position of this light (local transformation relative to whatever parent it has).
|
|
Get the diffuse color of this light.
|
|
Get the the maximum distance at which the light is guranteed to shine. Can be seen as the distance at which we turn the light of. Used for culling and selection of meshes to light, but not for the lighting itself. |
|
Get radial cutoff distance for directional lights. The directional light can be viewed as a cylinder with radius equal to DirectionalCutoffRadius and length CutoffDistance |
|
Get the dynamic type of this light. Supported types: |
|
Get flags for this light. Supported flags: |
|
Get the position of this light. This function correctly takes care of the optional parents of this light. |
|
Return the associated halo.
|
|
Get the specified light callback.
|
|
Get the number of light callbacks.
|
|
Get the id of this light. This is a 16-byte MD5.
|
|
Return a number that changes when the light changes (color, or position).
|
|
Get the movable for this light.
|
|
Get the sector for this light.
|
|
Get the specular color of this light.
|
|
Get spot light falloff angles. Get in cosine of the angle. |
|
Get the light type of this light.
|
|
Get the iObject for this light.
|
|
Get the scene node that this object represents.
|
|
Remove a mesh from this light.
|
|
Remove a light callback.
|
|
Set attenuation constants.
|
|
Set attenuation mode.
|
|
Set the position of this light.
|
|
Set the diffuse color of this light.
|
|
Set the the maximum distance at which the light is guranteed to shine. Can be seen as the distance at which we turn the light of. Used for culling and selection of meshes to light, but not for the lighting itself. |
|
Set radial cutoff distance for directional lights. The directional light can be viewed as a cylinder with radius equal to DirectionalCutoffRadius and length CutoffDistance |
|
Set the light callback. This will call IncRef() on the callback So make sure you call DecRef() to release your own reference. |
|
Set the specular color of this light.
|
|
Set spot light falloff angles. Set in cosine of the angle. |
|
Set the light type of this light.
|
|
For a dynamic light you need to call this to do the actual lighting calculations.
|
The documentation for this struct was generated from the following file:
- iengine/light.h
Generated for Crystal Space by doxygen 1.4.6