![]() |
Blue Brain BioExplorer
|
Manages light sources in a scene. More...
#include <LightManager.h>
Public Member Functions | |
PLATFORM_API size_t | addLight (LightPtr light) |
addLight Attaches a light source to the scene. More... | |
PLATFORM_API void | removeLight (const size_t id) |
removeLight Removes a light source from the scene for a given ID. More... | |
PLATFORM_API void | removeLight (LightPtr light) |
removeLight Removes a light source from the scene. More... | |
PLATFORM_API LightPtr | getLight (const size_t id) |
getLight Gets a light source from the scene for a given ID. Note: If changing the light then call markModified to propagate the changes. More... | |
PLATFORM_API const std::map< size_t, LightPtr > & | getLights () const |
getLights Gets all light sources currently managed by the LightManager object. More... | |
PLATFORM_API void | clearLights () |
clearLights Removes all light sources managed by the LightManager object. More... | |
![]() | |
BaseObject ()=default | |
virtual | ~BaseObject ()=default |
BaseObject (const BaseObject &) | |
BaseObject & | operator= (const BaseObject &rhs) |
bool | isModified () const |
void | resetModified () |
void | markModified (const bool triggerCallback=true) |
void | onModified (const ModifiedCallback &callback) |
void | clearModifiedCallback () |
Additional Inherited Members | |
![]() | |
using | ModifiedCallback = std::function< void(const BaseObject &)> |
![]() | |
template<typename T > | |
void | _updateValue (T &member, const T &newValue, const bool triggerCallback=true) |
template<class T > | |
bool | _isEqual (const T &a, const T &b, typename std::enable_if< std::is_floating_point< T >::value >::type *=0) |
template<class T > | |
bool | _isEqual (const T &a, const T &b, typename std::enable_if<!std::is_floating_point< T >::value >::type *=0) |
Manages light sources in a scene.
A LightManager object is responsible for managing light sources in a scene. It provides methods to add, remove, retrieve, and clear light sources.
Definition at line 40 of file LightManager.h.
size_t core::LightManager::addLight | ( | LightPtr | light | ) |
addLight Attaches a light source to the scene.
light | Pointer to an object representing the light source. |
Definition at line 30 of file LightManager.cpp.
void core::LightManager::clearLights | ( | ) |
clearLights Removes all light sources managed by the LightManager object.
Definition at line 97 of file LightManager.cpp.
LightPtr core::LightManager::getLight | ( | const size_t | id | ) |
getLight Gets a light source from the scene for a given ID. Note: If changing the light then call markModified to propagate the changes.
id | ID of the light to retrieve. |
Definition at line 83 of file LightManager.cpp.
const std::map< size_t, LightPtr > & core::LightManager::getLights | ( | ) | const |
getLights Gets all light sources currently managed by the LightManager object.
Definition at line 92 of file LightManager.cpp.
void core::LightManager::removeLight | ( | const size_t | id | ) |
removeLight Removes a light source from the scene for a given ID.
id | ID of the light source to be removed. |
Definition at line 51 of file LightManager.cpp.
void core::LightManager::removeLight | ( | LightPtr | light | ) |
removeLight Removes a light source from the scene.
light | Pointer to the light source to be removed. |
Definition at line 69 of file LightManager.cpp.