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

sglLightProcessor Class Reference

#include <sglLightProcessor.hpp>

Inheritance diagram for sglLightProcessor::

sglObject sglCountSortedLightProcessor sglDefaultLightProcessor sglSortedLightProcessor List of all members.

Public Methods

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

Detailed Description

The sglLightProcessor is an abstract base class that defines an interface that the sglCull traverser uses for processing lights during cull and draw. Since OpenGL has a limit to the number of lights that can be used at any given time, it is the job of the sglLightProcessor to decide which lights get used if there are more than the allowed number of lights in view.

Definition at line 44 of file sglLightProcessor.hpp.


Constructor & Destructor Documentation

sglLightProcessor::sglLightProcessor ( ) [inline]
 

Constructor.

Definition at line 48 of file sglLightProcessor.hpp.

sglLightProcessor::~sglLightProcessor ( ) [inline, virtual]
 

Destructor.

Definition at line 51 of file sglLightProcessor.hpp.


Member Function Documentation

void sglLightProcessor::reset ( ) [pure virtual]
 

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

Reimplemented in sglDefaultLightProcessor, sglSortedLightProcessor, and sglCountSortedLightProcessor.

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

Add a light for the current frame.

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

Reimplemented in sglDefaultLightProcessor, sglSortedLightProcessor, and sglCountSortedLightProcessor.

unsigned int sglLightProcessor::getNumLights ( ) const [pure virtual]
 

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

Returns:
the number of lights collected while culling the current frame.

Reimplemented in sglDefaultLightProcessor, sglSortedLightProcessor, and sglCountSortedLightProcessor.

void sglLightProcessor::apply ( ) [pure virtual]
 

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

Reimplemented in sglDefaultLightProcessor, sglSortedLightProcessor, and sglCountSortedLightProcessor.


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