#include <LightManager.h>


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 |
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.
| 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.
| 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 | ) |
Register a light into the LightManager.
Definition at line 69 of file LightManager.cpp.
References lights, MAX_NUMBER_OF_LIGHTS, and sofa::component::visualmodel::Light::setID().
Referenced by sofa::component::visualmodel::Light::init(), and putLights().
| 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.
Reimplemented from sofa::core::VisualModel.
Definition at line 72 of file LightManager.h.
std::vector<Light*> sofa::component::visualmodel::LightManager::lights [private] |
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] |
1.5.7.1