sofa::component::visualmodel::LightManager Class Reference

Utility to manage lights into an Opengl scene. More...

#include <LightManager.h>

Inheritance diagram for sofa::component::visualmodel::LightManager:

Inheritance graph
[legend]
Collaboration diagram for sofa::component::visualmodel::LightManager:

Collaboration graph
[legend]

Public Member Functions

 LightManager ()
virtual ~LightManager ()
void init ()
 Initialization method called at graph modification, during bottom-up traversal.
void reinit ()
 Update method called when variables used in precomputation are modified.
void initVisual ()
 Initialize the textures, or other graphical resources.
void update ()
 used to update the model if necessary.
void draw ()
 Render internal data of this object, for debugging purposes.
void putLight (Light *light)
 Register a light into the LightManager.
void putLights (std::vector< Light * > lights)
 Register a vector of lights into the LightManager.
void clear ()
 Remove all lights of the LightManager.

Private Attributes

std::vector< Light * > lights

Static Private Attributes

static const unsigned int MAX_NUMBER_OF_LIGHTS = GL_MAX_LIGHTS

Detailed Description

Utility to manage lights into an Opengl scene.

This class must be used with the Light class. It centralizes all the Lights and managed them.

Definition at line 60 of file LightManager.h.


Constructor & Destructor Documentation

sofa::component::visualmodel::LightManager::LightManager (  ) 

Definition at line 54 of file LightManager.cpp.

sofa::component::visualmodel::LightManager::~LightManager (  )  [virtual]

Definition at line 59 of file LightManager.cpp.


Member Function Documentation

void sofa::component::visualmodel::LightManager::clear (  ) 

Remove all lights of the LightManager.

Definition at line 106 of file LightManager.cpp.

References lights, and MAX_NUMBER_OF_LIGHTS.

void sofa::component::visualmodel::LightManager::draw (  )  [virtual]

Render internal data of this object, for debugging purposes.

Reimplemented from sofa::core::objectmodel::BaseObject.

Definition at line 87 of file LightManager.cpp.

References lights.

void sofa::component::visualmodel::LightManager::init ( void   )  [virtual]

Initialization method called at graph modification, during bottom-up traversal.

Reimplemented from sofa::core::objectmodel::BaseObject.

Definition at line 64 of file LightManager.cpp.

void sofa::component::visualmodel::LightManager::initVisual (  )  [virtual]

Initialize the textures, or other graphical resources.

Called once before the first frame is drawn, and if the graphical context has been recreated.

Reimplemented from sofa::core::VisualModel.

Definition at line 97 of file LightManager.cpp.

References lights.

void sofa::component::visualmodel::LightManager::putLight ( Light *  light  ) 

void sofa::component::visualmodel::LightManager::putLights ( std::vector< Light * >  lights  ) 

Register a vector of lights into the LightManager.

Definition at line 81 of file LightManager.cpp.

References putLight().

void sofa::component::visualmodel::LightManager::reinit (  )  [virtual]

Update method called when variables used in precomputation are modified.

Reimplemented from sofa::core::objectmodel::BaseObject.

Definition at line 113 of file LightManager.cpp.

References lights.

void sofa::component::visualmodel::LightManager::update (  )  [inline, virtual]

used to update the model if necessary.

Deprecated:
Use updateVisual() instead.

Reimplemented from sofa::core::VisualModel.

Definition at line 72 of file LightManager.h.


Field Documentation

Definition at line 63 of file LightManager.h.

Referenced by clear(), draw(), initVisual(), putLight(), and reinit().

const unsigned int sofa::component::visualmodel::LightManager::MAX_NUMBER_OF_LIGHTS = GL_MAX_LIGHTS [static, private]

Definition at line 62 of file LightManager.h.

Referenced by clear(), and putLight().


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

Generated on Sun Nov 23 04:21:44 2008 for Sofa by  doxygen 1.5.7.1