CrystalSpace

Public API Reference

iLight Struct Reference
[Lighting]

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

#include <iengine/light.h>

Inheritance diagram for iLight:

List of all members.

Public Member Functions

virtual iCrossHaloCreateCrossHalo (float intensity, float cross)=0
 Create a cross halo for this light.
virtual iFlareHaloCreateFlareHalo ()=0
 Create a flare halo for this light.
virtual iNovaHaloCreateNovaHalo (int seed, int num_spokes, float roundness)=0
 Create a nova halo for this light.
virtual const csVector4GetAttenuationConstants () 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 csVector3GetCenter () const =0
 Get the position of this light (local transformation relative to whatever parent it has).
virtual const csColorGetColor () const =0
 Get the diffuse color of this light.
virtual float GetCutoffDistance () const =0
 Get the the maximum distance at which the light is guaranteed 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 csFlagsGetFlags ()=0
 Get flags for this light.
virtual const csVector3 GetFullCenter () const =0
 Get the position of this light.
virtual iBaseHaloGetHalo () const =0
 Return the associated halo.
virtual iLightCallbackGetLightCallback (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 iMovableGetMovable ()=0
 Get the movable for this light ('this' space = light space, 'other' space = world space).
virtual iSectorGetSector ()=0
 Get the sector for this light.
virtual const csColorGetSpecularColor () const =0
 Get the specular color of this light.
virtual void GetSpotLightFalloff (float &inner, float &outer) const =0
 Get spot light falloff angles.
virtual iShaderVariableContextGetSVContext ()=0
 Get the shader variable context of the light.
virtual csLightType GetType () const =0
 Get the light type of this light.
virtual iObjectQueryObject ()=0
 Get the iObject for this light.
virtual iSceneNodeQuerySceneNode ()=0
 Get the scene node that this object represents.
virtual void RemoveLightCallback (iLightCallback *cb)=0
 Remove a light callback.
virtual void SetAttenuationConstants (const csVector4 &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 guaranteed 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 const csBox3GetLocalBBox () const =0
 Get the bounding box of the light (the bounds define the influence area).
virtual const csBox3GetWorldBBox () const =0
 Get the bounding box of the light (the bounds define the influence area).

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 233 of file light.h.


Member Function Documentation

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 csVector4& 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 (local transformation relative to whatever parent it has).

Deprecated in RM. Use GetMovable() and the iMovable interface

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 guaranteed to shine.

Can be seen as the distance at which we turn the light off. Used for culling and selection of meshes to light, but not for the lighting itself.

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 const csVector3 iLight::GetFullCenter (  )  const [pure virtual]

Get the position of this light.

This function correctly takes care of the optional parents of this light. Deprecated in RM. Use GetMovable() and the iMovable interface

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 const csBox3& iLight::GetLocalBBox (  )  const [pure virtual]

Get the bounding box of the light (the bounds define the influence area).

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

Get the movable for this light ('this' space = light space, 'other' space = world space).

The rotation of the movable determines the direction for directional and spot lights. Lights shine along +Z in light space; thus the direction in world space can be computed by translating the direction (0,0,1) from\ the movable's 'this' to 'other' space.

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

Get the sector for this light.

Deprecated in RM. Use GetMovable() and the iMovable interface

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 iShaderVariableContext* iLight::GetSVContext (  )  [pure virtual]

Get the shader variable context of the light.

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

Get the light type of this light.

virtual const csBox3& iLight::GetWorldBBox (  )  const [pure virtual]

Get the bounding box of the light (the bounds define the influence area).

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

Get the iObject for this light.

virtual iSceneNode* iLight::QuerySceneNode (  )  [pure virtual]

Get the scene node that this object represents.

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

Remove a light callback.

virtual void iLight::SetAttenuationConstants ( const csVector4 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.

Deprecated in RM. Use GetMovable() and the iMovable interface

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 guaranteed to shine.

Can be seen as the distance at which we turn the light off. Used for culling and selection of meshes to light, but not for the lighting itself.

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.


The documentation for this struct was generated from the following file:

Generated for Crystal Space 2.0 by doxygen 1.6.1