CrystalSpace

Public API Reference

Public Member Functions
iLightManager Struct Reference

An engine (3D or iso) can implement this interface for the benefit of mesh objects so that they can request lighting information from the engine. More...

#include <iengine/lightmgr.h>

Inheritance diagram for iLightManager:
iBase

List of all members.

Public Member Functions

virtual void FreeInfluenceArray (csLightInfluence *Array)=0
 Free a light influence array earlier allocated by GetRelevantLights.
virtual void GetRelevantLights (iMeshWrapper *meshObject, iLightInfluenceArray *lightArray, int maxLights, uint flags=CS_LIGHTQUERY_GET_ALL)=0
 Return all 'relevant' light that hit this object.
virtual void GetRelevantLights (iMeshWrapper *meshObject, iLightInfluenceCallback *lightCallback, int maxLights, uint flags=CS_LIGHTQUERY_GET_ALL)=0
 Return all 'relevant' light that hit this object.
virtual void GetRelevantLights (iSector *sector, iLightInfluenceArray *lightArray, int maxLights, uint flags=CS_LIGHTQUERY_GET_ALL)=0
 Return all 'relevant' lights for a given sector.
virtual void GetRelevantLights (iSector *sector, iLightInfluenceCallback *lightCallback, int maxLights, uint flags=CS_LIGHTQUERY_GET_ALL)=0
 Return all 'relevant' lights for a given sector.
virtual void GetRelevantLights (iSector *sector, const csBox3 &boundingBox, iLightInfluenceArray *lightArray, int maxLights, const csReversibleTransform *bboxToWorld=0, uint flags=CS_LIGHTQUERY_GET_ALL)=0
 Return all 'relevant' lights that intersects a giving bounding box within a specified sector.
virtual void GetRelevantLights (iSector *sector, const csBox3 &boundingBox, iLightInfluenceCallback *lightCallback, int maxLights, const csReversibleTransform *bboxToWorld=0, uint flags=CS_LIGHTQUERY_GET_ALL)=0
 Return all 'relevant' light/sector influence objects for a given sector.
virtual void GetRelevantLights (iMeshWrapper *meshObject, csLightInfluence *&lightArray, size_t &numLights, size_t maxLights=(size_t)~0, uint flags=CS_LIGHTQUERY_GET_ALL)=0
 Return all 'relevant' light that hit this object.
virtual void GetRelevantLights (iSector *sector, csLightInfluence *&lightArray, size_t &numLights, size_t maxLights=(size_t)~0, uint flags=CS_LIGHTQUERY_GET_ALL)=0
 Return all 'relevant' lights for a given sector.
virtual void GetRelevantLights (iSector *sector, const csBox3 &boundingBox, csLightInfluence *&lightArray, size_t &numLights, size_t maxLights=(size_t)~0, const csReversibleTransform *bboxToWorld=0, uint flags=CS_LIGHTQUERY_GET_ALL)=0
 Return all 'relevant' lights that intersects a giving bounding box within a specified sector.
virtual void GetRelevantLightsSorted (iSector *sector, const csBox3 &boundingBox, csLightInfluence *&lightArray, size_t &numLights, size_t maxLights=(size_t)~0, const csReversibleTransform *bboxToWorld=0, uint flags=CS_LIGHTQUERY_GET_ALL)=0
 Return all 'relevant' lights that intersects a giving bounding box within a specified sector.

Detailed Description

An engine (3D or iso) can implement this interface for the benefit of mesh objects so that they can request lighting information from the engine.

The 'logObject' parameter given to these functions is the logical parent that is set in the mesh objects. The engine must attempt to give this information as efficiently as possible. That means only recalculating this lighting information when needed (i.e. light moves, object moves, ...).

The engine registers an implementation of this object in the object registry with the "iLightManager" name.

Main creators of instances implementing this interface:

Main ways to get pointers to this interface:

Main users of this interface:

Definition at line 132 of file lightmgr.h.


Member Function Documentation

virtual void iLightManager::FreeInfluenceArray ( csLightInfluence *  Array) [pure virtual]

Free a light influence array earlier allocated by GetRelevantLights.

Parameters:
ArrayThe light influences array returned by GetRelevantLights().
virtual void iLightManager::GetRelevantLights ( iMeshWrapper meshObject,
iLightInfluenceArray *  lightArray,
int  maxLights,
uint  flags = CS_LIGHTQUERY_GET_ALL 
) [pure virtual]

Return all 'relevant' light that hit this object.

Depending on implementation in the engine this can simply mean a list of all lights that affect the object or it can be a list of the N most relevant lights (with N a parameter set by the user on that object).

Parameters:
logObjectlogObject is the mesh wrapper.
lightArraylightArray is the array to fill with the relevant lights.
maxLightsmaxLights is the maximum number of lights that you (as the caller of this function) are interested in. Even with this set the light manager may still return an array containing more lights. You just have to ignore the additional lights then. If you don't want to limit the number of lights you can set maxLights to -1.
flagsflags provided by csLightQueryFlags
virtual void iLightManager::GetRelevantLights ( iMeshWrapper meshObject,
iLightInfluenceCallback *  lightCallback,
int  maxLights,
uint  flags = CS_LIGHTQUERY_GET_ALL 
) [pure virtual]

Return all 'relevant' light that hit this object.

Depending on implementation in the engine this can simply mean a list of all lights that affect the object or it can be a list of the N most relevant lights (with N a parameter set by the user on that object).

Parameters:
logObjectlogObject is the mesh wrapper.
lightCallbacklightCallback is a callback function to call for every encountered influencing light source.
maxLightsmaxLights is the maximum number of lights that you (as the caller of this function) are interested in. Even with this set the light manager may still return an array containing more lights. You just have to ignore the additional lights then. If you don't want to limit the number of lights you can set maxLights to -1.
flagsflags provided by csLightQueryFlags
virtual void iLightManager::GetRelevantLights ( iSector sector,
iLightInfluenceArray *  lightArray,
int  maxLights,
uint  flags = CS_LIGHTQUERY_GET_ALL 
) [pure virtual]

Return all 'relevant' lights for a given sector.

Parameters:
sectoris the sector to check for.
lightArraylightArray is the array to fill with the relevant lights.
maxLightsmaxLights is the maximum number of lights that you (as the caller of this function) are interested in. Even with this set the light manager may still return an array containing more lights. You just have to ignore the additional lights then. If you don't want to limit the number of lights you can set maxLights to -1.
flagsflags provided by csLightQueryFlags
virtual void iLightManager::GetRelevantLights ( iSector sector,
iLightInfluenceCallback *  lightCallback,
int  maxLights,
uint  flags = CS_LIGHTQUERY_GET_ALL 
) [pure virtual]

Return all 'relevant' lights for a given sector.

Parameters:
sectoris the sector to check for.
lightCallbacklightCallback is a callback function to call for every encountered influencing light source.
maxLightsmaxLights is the maximum number of lights that you (as the caller of this function) are interested in. Even with this set the light manager may still return an array containing more lights. You just have to ignore the additional lights then. If you don't want to limit the number of lights you can set maxLights to -1.
flagsflags provided by csLightQueryFlags
virtual void iLightManager::GetRelevantLights ( iSector sector,
const csBox3 boundingBox,
iLightInfluenceArray *  lightArray,
int  maxLights,
const csReversibleTransform bboxToWorld = 0,
uint  flags = CS_LIGHTQUERY_GET_ALL 
) [pure virtual]

Return all 'relevant' lights that intersects a giving bounding box within a specified sector.

Parameters:
sectoris the sector to check for.
boundingBoxis the bounding box to use when querying lights.
lightArraylightArray is the array to fill with the relevant lights.
maxLightsmaxLights is the maximum number of lights that you (as the caller of this function) are interested in. Even with this set the light manager may still return an array containing more lights. You just have to ignore the additional lights then. If you don't want to limit the number of lights you can set maxLights to -1.
bboxToWorldOptional transformation from bounding box to world space. 'this' space is bounding box space, 'other' space is world space. Not specifying the transformation has the same effect as specifying an identity transform.
flagsflags provided by csLightQueryFlags
virtual void iLightManager::GetRelevantLights ( iSector sector,
const csBox3 boundingBox,
iLightInfluenceCallback *  lightCallback,
int  maxLights,
const csReversibleTransform bboxToWorld = 0,
uint  flags = CS_LIGHTQUERY_GET_ALL 
) [pure virtual]

Return all 'relevant' light/sector influence objects for a given sector.

Parameters:
sectoris the sector to check for.
boundingBoxis the bounding box to use when querying lights.
lightCallbacklightCallback is a callback function to call for every encountered influencing light source.
maxLightsmaxLights is the maximum number of lights that you (as the caller of this function) are interested in. Even with this set the light manager may still return an array containing more lights. You just have to ignore the additional lights then. If you don't want to limit the number of lights you can set maxLights to -1.
bboxToWorldOptional transformation from bounding box to world space. 'this' space is bounding box space, 'other' space is world space. Not specifying the transformation has the same effect as specifying an identity transform.
flagsflags provided by csLightQueryFlags
virtual void iLightManager::GetRelevantLights ( iMeshWrapper meshObject,
csLightInfluence *&  lightArray,
size_t &  numLights,
size_t  maxLights = (size_t)~0,
uint  flags = CS_LIGHTQUERY_GET_ALL 
) [pure virtual]

Return all 'relevant' light that hit this object.

Depending on implementation in the engine this can simply mean a list of all lights that affect the object or it can be a list of the N most relevant lights (with N a parameter set by the user on that object).

Parameters:
meshObjectThe mesh wrapper.
boundingBoxThe bounding box to be used when querying lights.
lightArrayReturns a pointer to an arry with the influences of the relevant lights. Must be freed with FreeInfluenceArray() after use.
numLightsThe number of lights returned in lightArray.
maxLightsThe maximum number of lights that you (as the caller of this function) are interested in.
flagsFlags provided by csLightQueryFlags.
virtual void iLightManager::GetRelevantLights ( iSector sector,
csLightInfluence *&  lightArray,
size_t &  numLights,
size_t  maxLights = (size_t)~0,
uint  flags = CS_LIGHTQUERY_GET_ALL 
) [pure virtual]

Return all 'relevant' lights for a given sector.

Parameters:
sectoris the sector to check for.
boundingBoxThe bounding box to be used when querying lights.
lightArrayReturns a pointer to an arry with the influences of the relevant lights. Must be freed with FreeInfluenceArray() after use.
numLightsThe number of lights returned in lightArray.
maxLightsThe maximum number of lights that you (as the caller of this function) are interested in.
flagsFlags provided by csLightQueryFlags.
virtual void iLightManager::GetRelevantLights ( iSector sector,
const csBox3 boundingBox,
csLightInfluence *&  lightArray,
size_t &  numLights,
size_t  maxLights = (size_t)~0,
const csReversibleTransform bboxToWorld = 0,
uint  flags = CS_LIGHTQUERY_GET_ALL 
) [pure virtual]

Return all 'relevant' lights that intersects a giving bounding box within a specified sector.

Parameters:
sectoris the sector to check for.
boundingBoxThe bounding box to be used when querying lights.
lightArrayReturns a pointer to an arry with the influences of the relevant lights. Must be freed with FreeInfluenceArray() after use.
numLightsThe number of lights returned in lightArray.
maxLightsThe maximum number of lights that you (as the caller of this function) are interested in.
bboxToWorldOptional transformation from bounding box to world space. 'this' space is bounding box space, 'other' space is world space. Not specifying the transformation has the same effect as specifying an identity transform.
flagsFlags provided by csLightQueryFlags.
virtual void iLightManager::GetRelevantLightsSorted ( iSector sector,
const csBox3 boundingBox,
csLightInfluence *&  lightArray,
size_t &  numLights,
size_t  maxLights = (size_t)~0,
const csReversibleTransform bboxToWorld = 0,
uint  flags = CS_LIGHTQUERY_GET_ALL 
) [pure virtual]

Return all 'relevant' lights that intersects a giving bounding box within a specified sector.

The returned lights are sorted by the intensity at the closest point on(or in) the box.

Parameters:
sectoris the sector to check for.
boundingBoxThe bounding box to be used when querying lights.
lightArrayReturns a pointer to an arry with the influences of the relevant lights. Must be freed with FreeInfluenceArray() after use.
numLightsThe number of lights returned in lightArray.
maxLightsThe maximum number of lights that you (as the caller of this function) are interested in.
bboxToWorldOptional transformation from bounding box to world space. 'this' space is bounding box space, 'other' space is world space. Not specifying the transformation has the same effect as specifying an identity transform.
flagsFlags provided by csLightQueryFlags.

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

Generated for Crystal Space 2.0 by doxygen 1.7.6.1