Radium Engine  1.5.20
Loading...
Searching...
No Matches
Ra::Engine::Scene::LightManager Class Referenceabstract

#include <Engine/Scene/LightManager.hpp>

+ Inheritance diagram for Ra::Engine::Scene::LightManager:
+ Collaboration diagram for Ra::Engine::Scene::LightManager:

Public Member Functions

 LightManager ()=default
 Constructor.
 
 LightManager (const LightManager &)=delete
 
LightManageroperator= (const LightManager &)=delete
 
 ~LightManager () override
 Virtual destructor.
 
virtual const Scene::LightgetLight (size_t li) const =0
 Get a pointer to the li-th Light.
 
virtual void addLight (const Scene::Light *li)=0
 
virtual size_t count () const
 Number of lights. This is still a work in progress. The idea is to make it possible for a LightManager to tell it has only one Light, for example if it wants to send a lot of sources at once in a single RenderParams, let's say a texture.
 
void generateTasks (Core::TaskQueue *taskQueue, const Engine::FrameInfo &frameInfo) override
 Do nothing as this system only manage light related asset loading.
 
void handleAssetLoading (Entity *entity, const Core::Asset::FileData *data) override
 Transform loaded file data to usable entities and component in the engine.
 
- Public Member Functions inherited from Ra::Engine::Scene::System
std::vector< Component * > getEntityComponents (const Entity *entity)
 
void addComponent (Entity *entity, Component *component)
 

Protected Member Functions

void registerComponent (const Entity *entity, Component *component) final
 
void unregisterComponent (const Entity *entity, Component *component) final
 
void unregisterAllComponents (const Entity *entity) final
 
- Protected Member Functions inherited from Ra::Engine::Scene::System

Protected Attributes

std::unique_ptr< LightStoragem_data { nullptr }
 Stores the object that stores the lights...
 
- Protected Attributes inherited from Ra::Engine::Scene::System
std::vector< std::pair< const Entity *, Component * > > m_components
 List of active components.
 

Detailed Description

Interface providing functions to manage a group or type of lights in a specific way.

Definition at line 17 of file LightManager.hpp.

Member Function Documentation

◆ addLight()

virtual void Ra::Engine::Scene::LightManager::addLight ( const Scene::Light * li)
pure virtual

Add a light to the manager ... Consider the component is already registered. The light manager will not take ownership of the added light, it will just push the light on the storage ...

Parameters
liThe (already registered) light to add.

Implemented in Ra::Engine::Scene::DefaultLightManager.

◆ count()

size_t Ra::Engine::Scene::LightManager::count ( ) const
virtual

Number of lights. This is still a work in progress. The idea is to make it possible for a LightManager to tell it has only one Light, for example if it wants to send a lot of sources at once in a single RenderParams, let's say a texture.

Definition at line 28 of file LightManager.cpp.

◆ generateTasks()

void Ra::Engine::Scene::LightManager::generateTasks ( Core::TaskQueue * taskQueue,
const Engine::FrameInfo & frameInfo )
overridevirtual

Do nothing as this system only manage light related asset loading.

Implements Ra::Engine::Scene::System.

Definition at line 36 of file LightManager.cpp.

◆ getLight()

virtual const Scene::Light * Ra::Engine::Scene::LightManager::getLight ( size_t li) const
pure virtual

Get a pointer to the li-th Light.

Implemented in Ra::Engine::Scene::DefaultLightManager.

◆ handleAssetLoading()

void Ra::Engine::Scene::LightManager::handleAssetLoading ( Entity * entity,
const Core::Asset::FileData * data )
overridevirtual

Transform loaded file data to usable entities and component in the engine.

Reimplemented from Ra::Engine::Scene::System.

Definition at line 41 of file LightManager.cpp.

+ Here is the call graph for this function:

◆ registerComponent()

void Ra::Engine::Scene::LightManager::registerComponent ( const Entity * entity,
Component * component )
finalprotectedvirtual

Inherited method marked as final to ensure correct memory management even in child classes (e.g. LightStorage).

Reimplemented from Ra::Engine::Scene::System.

Definition at line 116 of file LightManager.cpp.

+ Here is the call graph for this function:

◆ unregisterAllComponents()

void Ra::Engine::Scene::LightManager::unregisterAllComponents ( const Entity * entity)
finalprotectedvirtual

Inherited method marked as final to ensure correct memory management even in child classes (e.g. LightStorage).

Reimplemented from Ra::Engine::Scene::System.

Definition at line 126 of file LightManager.cpp.

+ Here is the call graph for this function:

◆ unregisterComponent()

void Ra::Engine::Scene::LightManager::unregisterComponent ( const Entity * entity,
Component * component )
finalprotectedvirtual

Inherited method marked as final to ensure correct memory management even in child classes (e.g. LightStorage).

Reimplemented from Ra::Engine::Scene::System.

Definition at line 121 of file LightManager.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_data

std::unique_ptr<LightStorage> Ra::Engine::Scene::LightManager::m_data { nullptr }
protected

Stores the object that stores the lights...

Definition at line 77 of file LightManager.hpp.


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