CrystalSpace

Public API Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

iLight Struct Reference
[Lighting]

The iLight interface is the SCF interface for the csLight class. More...

#include <iengine/light.h>

Inheritance diagram for iLight:

iBase List of all members.

Public Member Functions

virtual const char * GetLightID ()=0
 Get the id of this light. This is a 16-byte MD5.
virtual iObject * QueryObject ()=0
 Get the iObject for this light.
virtual csLightDynamicType GetDynamicType () const =0
 Get the dynamic type of this light.
virtual const csVector3 & GetCenter () const =0
 Get the position of this light.
virtual void SetCenter (const csVector3 &pos)=0
 Set the position of this light.
virtual iSector * GetSector ()=0
 Get the sector for this light.
virtual iMovable * GetMovable ()=0
 Get the movable for this light.
virtual const csColor & GetColor () const =0
 Get the diffuse color of this light.
virtual void SetColor (const csColor &col)=0
 Set the diffuse color of this light.
virtual const csColor & GetSpecularColor () const =0
 Get the specular color of this light.
virtual void SetSpecularColor (const csColor &col)=0
 Set the specular color of this light.
virtual csLightType GetType () const =0
 Get the light type of this light.
virtual void SetType (csLightType type)=0
 Set the light type of this light.
virtual const csVector3 & GetDirection () const =0
 Get the light direction. Used for directional and spotlight.
virtual void SetDirection (const csVector3 &v)=0
 Set the light direction. Used for directional and spotlight.
virtual csLightAttenuationMode GetAttenuationMode () const =0
 Return current attenuation mode.
virtual void SetAttenuationMode (csLightAttenuationMode a)=0
 Set attenuation mode.
virtual void SetAttenuationConstants (const csVector3 &constants)=0
 Set attenuation constants.
virtual const csVector3 & GetAttenuationConstants () const =0
 Get attenuation constants.
virtual float GetCutoffDistance () const =0
 Get the the maximum distance at which the light is guranteed to shine.
virtual void SetCutoffDistance (float distance)=0
 Set 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 void SetDirectionalCutoffRadius (float radius)=0
 Set radial cutoff distance for directional lights.
virtual void SetSpotLightFalloff (float inner, float outer)=0
 Set spot light falloff angles.
virtual void GetSpotLightFalloff (float &inner, float &outer) const =0
 Get spot light falloff angles.
virtual iCrossHalo * CreateCrossHalo (float intensity, float cross)=0
 Create a cross halo for this light.
virtual iNovaHalo * CreateNovaHalo (int seed, int num_spokes, float roundness)=0
 Create a nova halo for this light.
virtual iFlareHalo * CreateFlareHalo ()=0
 Create a flare halo for this light.
virtual iBaseHalo * GetHalo () const =0
 Return the associated halo.
virtual float GetBrightnessAtDistance (float d) const =0
 Get the brightness of a light at a given distance.
virtual csFlags & GetFlags ()=0
 Get flags for this light.
virtual void SetLightCallback (iLightCallback *cb)=0
 Set the light callback.
virtual void RemoveLightCallback (iLightCallback *cb)=0
 Remove a light callback.
virtual int GetLightCallbackCount () const =0
 Get the number of light callbacks.
virtual iLightCallback * GetLightCallback (int idx) const =0
 Get the specified light callback.
virtual uint32 GetLightNumber () const =0
 Return a number that changes when the light changes (color, or position).
virtual void AddAffectedLightingInfo (iLightingInfo *li)=0
 Add a mesh to this light.
virtual void RemoveAffectedLightingInfo (iLightingInfo *li)=0
 Remove a mesh from 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:

Main creators of instances implementing this interface:

Main ways to get pointers to this interface: Main users of this interface:

Definition at line 249 of file light.h.


Member Function Documentation

virtual void iLight::AddAffectedLightingInfo (  iLightingInfo *  li  )  [pure virtual]
 

Add a mesh to this light.

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

virtual iCrossHalo* iLight::CreateCrossHalo (  float  intensity,
float  cross
)  [pure virtual]
 

Create a cross halo for this light.

virtual iFlareHalo* iLight::CreateFlareHalo (   )  [pure virtual]
 

Create a flare halo for this light.

virtual iNovaHalo* iLight::CreateNovaHalo (  int  seed,
int  num_spokes,
float  roundness
)  [pure virtual]
 

Create a nova halo for this light.

virtual const csVector3& iLight::GetAttenuationConstants (   )  const [pure virtual]
 

Get attenuation constants.

See also:
csLightAttenuationMode

virtual csLightAttenuationMode iLight::GetAttenuationMode (   )  const [pure virtual]
 

Return current attenuation mode.

See also:
csLightAttenuationMode

virtual float iLight::GetBrightnessAtDistance (  float  d  )  const [pure virtual]
 

Get the brightness of a light at a given distance.

virtual const csVector3& iLight::GetCenter (   )  const [pure virtual]
 

Get the position of this light.

virtual const csColor& iLight::GetColor (   )  const [pure virtual]
 

Get the diffuse color of this light.

virtual float iLight::GetCutoffDistance (   )  const [pure virtual]
 

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.

virtual const csVector3& iLight::GetDirection (   )  const [pure virtual]
 

Get the light direction. Used for directional and spotlight.

virtual float iLight::GetDirectionalCutoffRadius (   )  const [pure virtual]
 

Get radial cutoff distance for directional lights.

The directional light can be viewed as a cylinder with radius equal to DirectionalCutoffRadius and length CutoffDistance

virtual csLightDynamicType iLight::GetDynamicType (   )  const [pure virtual]
 

Get the dynamic type of this light.

Supported types:

virtual csFlags& iLight::GetFlags (   )  [pure virtual]
 

Get flags for this light.

Supported flags:

virtual iBaseHalo* iLight::GetHalo (   )  const [pure virtual]
 

Return the associated halo.

virtual iLightCallback* iLight::GetLightCallback (  int  idx  )  const [pure virtual]
 

Get the specified light callback.

virtual int iLight::GetLightCallbackCount (   )  const [pure virtual]
 

Get the number of light callbacks.

virtual const char* iLight::GetLightID (   )  [pure virtual]
 

Get the id of this light. This is a 16-byte MD5.

virtual uint32 iLight::GetLightNumber (   )  const [pure virtual]
 

Return a number that changes when the light changes (color, or position).

virtual iMovable* iLight::GetMovable (   )  [pure virtual]
 

Get the movable for this light.

virtual iSector* iLight::GetSector (   )  [pure virtual]
 

Get the sector for this light.

virtual const csColor& iLight::GetSpecularColor (   )  const [pure virtual]
 

Get the specular color of this light.

virtual void iLight::GetSpotLightFalloff (  float &  inner,
float &  outer
)  const [pure virtual]
 

Get spot light falloff angles.

Get in cosine of the angle.

virtual csLightType iLight::GetType (   )  const [pure virtual]
 

Get the light type of this light.

virtual iObject* iLight::QueryObject (   )  [pure virtual]
 

Get the iObject for this light.

virtual void iLight::RemoveAffectedLightingInfo (  iLightingInfo *  li  )  [pure virtual]
 

Remove a mesh from this light.

virtual void iLight::RemoveLightCallback (  iLightCallback *  cb  )  [pure virtual]
 

Remove a light callback.

virtual void iLight::SetAttenuationConstants (  const csVector3 &  constants  )  [pure virtual]
 

Set attenuation constants.

See also:
csLightAttenuationMode

virtual void iLight::SetAttenuationMode (  csLightAttenuationMode  a  )  [pure virtual]
 

Set attenuation mode.

See also:
csLightAttenuationMode

virtual void iLight::SetCenter (  const csVector3 &  pos  )  [pure virtual]
 

Set the position of this light.

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

Set the diffuse color of this light.

virtual void iLight::SetCutoffDistance (  float  distance  )  [pure virtual]
 

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.

virtual void iLight::SetDirection (  const csVector3 &  v  )  [pure virtual]
 

Set the light direction. Used for directional and spotlight.

virtual void iLight::SetDirectionalCutoffRadius (  float  radius  )  [pure virtual]
 

Set radial cutoff distance for directional lights.

The directional light can be viewed as a cylinder with radius equal to DirectionalCutoffRadius and length CutoffDistance

virtual void iLight::SetLightCallback (  iLightCallback *  cb  )  [pure virtual]
 

Set the light callback.

This will call IncRef() on the callback So make sure you call DecRef() to release your own reference.

virtual void iLight::SetSpecularColor (  const csColor &  col  )  [pure virtual]
 

Set the specular color of this light.

virtual void iLight::SetSpotLightFalloff (  float  inner,
float  outer
)  [pure virtual]
 

Set spot light falloff angles.

Set in cosine of the angle.

virtual void iLight::SetType (  csLightType  type  )  [pure virtual]
 

Set the light type of this light.

virtual void iLight::Setup (   )  [pure virtual]
 

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:
Generated for Crystal Space by doxygen 1.3.9.1