CrystalSpace

Public API Reference

CS::RenderManager::LightingSorter Class Reference

Lighting sorter. More...

#include <csplugincommon/rendermanager/lightsetup.h>

List of all members.

Classes

struct  LightInfo
 Information associated with a light. More...
struct  PersistentData
 Data used by the helper that needs to persist over multiple frames. More...

Public Member Functions

void AddLight (const csLightInfluence &influence, uint numSubLights, const csFlags &lightFlagsMask)
 Add a light to the sorter.
bool GetNextLight (const LightSettings &settings, LightInfo &out)
 Get the next light if compatible to settings, optionally skipping static lights.
bool GetNextLight (LightInfo &out)
 Get the next light, optionally skipping static lights.
size_t GetSize ()
 Query how many lights are in this sorter.
 LightingSorter (PersistentData &persist, size_t numLights)
 Construct.
void PutInFront (LightInfo *lights, size_t num)
 Put earlier fetched lights back into the list.
void SetLightsLimit (size_t limit)
 Set the maximum number of lights to keep in the sorter.
void SetNumLights (size_t numLights)
 Set the expected number of lights to be added.

Detailed Description

Lighting sorter.

Sorts lights in a way that lights with compatible settings appear after one another.

Definition at line 158 of file lightsetup.h.


Constructor & Destructor Documentation

CS::RenderManager::LightingSorter::LightingSorter ( PersistentData persist,
size_t  numLights 
)

Construct.

numLights is a hint about the expected number of lighta added.


Member Function Documentation

void CS::RenderManager::LightingSorter::AddLight ( const csLightInfluence &  influence,
uint  numSubLights,
const csFlags lightFlagsMask 
)

Add a light to the sorter.

influence specifies information about the light to add, numSubLights specifies as how many "virtual" lights a light should be treated, lightFlagsMask specifies a mask that is applied to the light flags before comparing them for light compatibility purposes.

bool CS::RenderManager::LightingSorter::GetNextLight ( const LightSettings settings,
LightInfo out 
)

Get the next light if compatible to settings, optionally skipping static lights.

bool CS::RenderManager::LightingSorter::GetNextLight ( LightInfo out  ) 

Get the next light, optionally skipping static lights.

size_t CS::RenderManager::LightingSorter::GetSize (  )  [inline]

Query how many lights are in this sorter.

Definition at line 218 of file lightsetup.h.

void CS::RenderManager::LightingSorter::PutInFront ( LightInfo lights,
size_t  num 
)

Put earlier fetched lights back into the list.

void CS::RenderManager::LightingSorter::SetLightsLimit ( size_t  limit  )  [inline]

Set the maximum number of lights to keep in the sorter.

Definition at line 228 of file lightsetup.h.

void CS::RenderManager::LightingSorter::SetNumLights ( size_t  numLights  ) 

Set the expected number of lights to be added.


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

Generated for Crystal Space 2.0 by doxygen 1.6.1