Castor3D  ..
Public Member Functions | List of all members
Castor3D::LightManager Class Reference

Light manager. More...

+ Inheritance diagram for Castor3D::LightManager:
+ Collaboration diagram for Castor3D::LightManager:

Public Member Functions

C3D_API LightManager (Scene &p_owner, SceneNodeSPtr p_rootNode, SceneNodeSPtr p_rootCameraNode, SceneNodeSPtr p_rootObjectNode)
 Constructor. More...
 
C3D_API ~LightManager ()
 Destructor. More...
 
C3D_API void Cleanup ()
 Sets all the elements to be cleaned up. More...
 
C3D_API void Insert (Castor::String const &p_name, LightSPtr p_element)
 Removes an object, given a name. More...
 
C3D_API void Remove (Castor::String const &p_name)
 Removes an object, given a name. More...
 
C3D_API void BindLights (ShaderProgram &p_program, FrameVariableBuffer &p_sceneBuffer)
 Binds the scene lights. More...
 
C3D_API void UnbindLights (ShaderProgram &p_program, FrameVariableBuffer &p_sceneBuffer)
 Unbinds the scene lights. More...
 
C3D_API std::shared_ptr< LightCreate (Castor::String const &p_name, SceneNodeSPtr p_parent, eLIGHT_TYPE p_lightType)
 Creates a light. More...
 
- Public Member Functions inherited from Castor3D::ObjectManager< Castor::String, Light >
EngineGetEngine () const
 
void Cleanup ()
 Sets all the elements to be cleaned up. More...
 
void Remove (Castor::String const &p_name)
 Removes an object, given a name. More...
 
void MergeInto (ObjectManager< Castor::String, Light > &p_destination)
 
std::shared_ptr< LightCreate (Castor::String const &p_name, SceneNodeSPtr p_parent=nullptr, Parameters &&... p_params)
 Creates an object. More...
 
uint32_t GetObjectCount () const
 
- Public Member Functions inherited from Castor3D::Manager< Castor::String, Light, Scene, ObjectManagerEngineGetter >
void Cleanup ()
 Sets all the elements to be cleaned up. More...
 
void Clear ()
 Flushes the collection. More...
 
bool IsEmpty ()
 
void Insert (Castor::String const &p_name, std::shared_ptr< Light > p_element)
 Removes an object, given a name. More...
 
void Remove (Castor::String const &p_name)
 Removes an object, given a name. More...
 
void SetRenderSystem (RenderSystem *p_renderSystem)
 
RenderSystemSetRenderSystem () const
 
EngineGetEngine () const
 
Castor::String const & GetObjectTypeName () const
 
bool Has (Castor::String const &p_name) const
 
std::shared_ptr< LightFind (Castor::String const &p_name) const
 Looks for an element with given name. More...
 
void lock () const
 Locks the collection mutex. More...
 
void unlock () const
 Unlocks the collection mutex. More...
 
Collection::TObjPtrMapIt begin ()
 Returns an iterator to the first element of the collection. More...
 
Collection::TObjPtrMapConstIt begin () const
 Returns an constant iterator to the first element of the collection. More...
 
Collection::TObjPtrMapIt end ()
 Returns an iterator to the after last element of the collection. More...
 
Collection::TObjPtrMapConstIt end () const
 Returns an constant iterator to the after last element of the collection. More...
 
std::shared_ptr< LightCreate (Castor::String const &p_name, Parameters &&... p_params)
 Creates an object. More...
 

Additional Inherited Members

- Public Types inherited from Castor3D::Manager< Castor::String, Light, Scene, ObjectManagerEngineGetter >
typedef Castor::Collection< Light, Castor::String > Collection
 
- Protected Member Functions inherited from Castor3D::ObjectManager< Castor::String, Light >
 ObjectManager (Scene &p_owner, SceneNodeSPtr p_rootNode, SceneNodeSPtr p_rootCameraNode, SceneNodeSPtr p_rootObjectNode)
 Constructor. More...
 
 ~ObjectManager ()
 Destructor. More...
 
- Protected Member Functions inherited from Castor3D::Manager< Castor::String, Light, Scene, ObjectManagerEngineGetter >
 Manager (Scene &p_owner)
 Constructor. More...
 
 ~Manager ()
 Destructor. More...
 
- Protected Attributes inherited from Castor3D::ObjectManager< Castor::String, Light >
SceneNodeWPtr m_rootNode
 The root node. More...
 
SceneNodeWPtr m_rootCameraNode
 The root node used only for cameras (used to ease the use of cameras) More...
 
SceneNodeWPtr m_rootObjectNode
 The root node for every object other than camera (used to ease the use of cameras) More...
 
- Protected Attributes inherited from Castor3D::Manager< Castor::String, Light, Scene, ObjectManagerEngineGetter >
RenderSystemm_renderSystem
 The RenderSystem. More...
 
Collection m_elements
 The elements collection. More...
 

Detailed Description

Light manager.

Author
Sylvain DOREMUS
Date
29/01/2016
Version
0.8.0

Constructor & Destructor Documentation

◆ LightManager()

C3D_API Castor3D::LightManager::LightManager ( Scene p_owner,
SceneNodeSPtr  p_rootNode,
SceneNodeSPtr  p_rootCameraNode,
SceneNodeSPtr  p_rootObjectNode 
)

Constructor.

Parameters
[in]p_ownerThe owner.
[in]p_rootNodeThe root node.
[in]p_rootCameraNodeThe cameras root node.
[in]p_rootObjectNodeThe objects root node.

◆ ~LightManager()

C3D_API Castor3D::LightManager::~LightManager ( )

Destructor.

Member Function Documentation

◆ BindLights()

C3D_API void Castor3D::LightManager::BindLights ( ShaderProgram p_program,
FrameVariableBuffer p_sceneBuffer 
)

Binds the scene lights.

Parameters
[in]p_programThe shader program.
[in]p_sceneBufferThe constants buffer.

◆ Cleanup()

C3D_API void Castor3D::LightManager::Cleanup ( )

Sets all the elements to be cleaned up.

◆ Create()

C3D_API std::shared_ptr< Light > Castor3D::LightManager::Create ( Castor::String const &  p_name,
SceneNodeSPtr  p_parent,
eLIGHT_TYPE  p_lightType 
)

Creates a light.

Parameters
[in]p_nameThe object name.
[in]p_parentThe parent scene node.
[in]p_lightTypeThe light source type.
Returns
The created object.

◆ Insert()

C3D_API void Castor3D::LightManager::Insert ( Castor::String const &  p_name,
LightSPtr  p_element 
)

Removes an object, given a name.

Parameters
[in]p_nameThe element name.
[in]p_elementThe element.

◆ Remove()

C3D_API void Castor3D::LightManager::Remove ( Castor::String const &  p_name)

Removes an object, given a name.

Parameters
[in]p_nameThe object name.

◆ UnbindLights()

C3D_API void Castor3D::LightManager::UnbindLights ( ShaderProgram p_program,
FrameVariableBuffer p_sceneBuffer 
)

Unbinds the scene lights.

Parameters
[in]p_programThe shader program.
[in]p_sceneBufferThe constants buffer.

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