CrystalSpace

Public API Reference

Classes | Public Member Functions
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 (LightInfo &out)
 Get the next light, optionally skipping static lights.
bool GetNextLight (const LightSettings &settings, LightInfo &out)
 Get the next light if compatible to settings, 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

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.

Get the next light, optionally skipping static lights.

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

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.

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.7.6.1