Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

sglCountSortedLightProcessor Class Reference

#include <sglLightProcessor.hpp>

Inheritance diagram for sglCountSortedLightProcessor::

sglLightProcessor sglObject List of all members.

Public Methods

 sglCountSortedLightProcessor (unsigned int num_bins=10)
virtual ~sglCountSortedLightProcessor ()
virtual void reset ()
virtual void addLight (const sglMat4f &matrix, const sglLight *light)
virtual unsigned int getNumLights () const
virtual void apply ()

Detailed Description

The sglCountSortedLightProcessor sacrifices some accuracy in the sort for speed comparible to the sglDefaultLightProcessor class. This class uses the counting sort, O(n+k), where the sort keys are truncated to k (num_bins) integer values.

Definition at line 158 of file sglLightProcessor.hpp.

Constructor & Destructor Documentation

sglCountSortedLightProcessor::sglCountSortedLightProcessor ( unsigned int num_bins = 10 )


ams num_bins The number of integer sort values to use when
sorting the lights.

sglCountSortedLightProcessor::~sglCountSortedLightProcessor ( ) [virtual]


Member Function Documentation

void sglCountSortedLightProcessor::reset ( ) [inline, virtual]

Resets the processor for the next frame (e.g. clears list of lights).

Reimplemented from sglLightProcessor.

Definition at line 171 of file sglLightProcessor.hpp.

virtual void sglCountSortedLightProcessor::addLight ( const sglMat4f & matrix,
const sglLight * light ) [virtual]

Add a light for the current frame.

matrix   modelview matrix to be used when applying this light
light   pointer to the new light

Reimplemented from sglLightProcessor.

unsigned int sglCountSortedLightProcessor::getNumLights ( ) const [inline, virtual]

Query the number of lights collected while culling the current frame.

the number of lights collected while culling the current frame.

Reimplemented from sglLightProcessor.

Definition at line 181 of file sglLightProcessor.hpp.

virtual void sglCountSortedLightProcessor::apply ( ) [virtual]

Applys the lights collected for this frame. Note: this will apply at most sgl::s_max_lights.

Reimplemented from sglLightProcessor.

The documentation for this class was generated from the following file:
Generated at Mon Jul 1 18:00:07 2002 for SGL by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001