Radium Engine  1.5.20
Loading...
Searching...
No Matches
LightManager.hpp
1#pragma once
2
3#include <Engine/RaEngine.hpp>
4#include <Engine/Scene/LightStorage.hpp>
5#include <Engine/Scene/System.hpp>
6
7#include <memory>
8
9namespace Ra {
10namespace Engine {
11namespace Scene {
12
17class RA_ENGINE_API LightManager : public System
18{
19 // Radium-V2 : make light manager compatible with range for ...
20 public:
22 LightManager() = default;
23
24 // Make copies impossible
25 LightManager( const LightManager& ) = delete;
26 LightManager& operator=( const LightManager& ) = delete;
27
29 ~LightManager() override;
30
32 virtual const Scene::Light* getLight( size_t li ) const = 0;
33
39 virtual void addLight( const Scene::Light* li ) = 0;
40
41 //
42 // Calls for the Renderer. Note that
43 //
44
51 virtual size_t count() const;
52
53 //
54 // System methods
55 //
57 void generateTasks( Core::TaskQueue* taskQueue, const Engine::FrameInfo& frameInfo ) override;
58
60 void handleAssetLoading( Entity* entity, const Core::Asset::FileData* data ) override;
61
62 protected:
65 void registerComponent( const Entity* entity, Component* component ) final;
66
69 void unregisterComponent( const Entity* entity, Component* component ) final;
70
73 void unregisterAllComponents( const Entity* entity ) final;
74
75 protected:
78};
79
80} // namespace Scene
81} // namespace Engine
82} // namespace Ra
This class allows tasks to be registered and then executed in parallel on separate threads.
Definition TaskQueue.hpp:48
A component is an element that can be updated by a system. It is also linked to some other components...
Definition Component.hpp:31
An entity is an scene element. It ties together components with a transform.
Definition Entity.hpp:23
virtual void addLight(const Scene::Light *li)=0
LightManager()=default
Constructor.
~LightManager() override
Virtual destructor.
virtual const Scene::Light * getLight(size_t li) const =0
Get a pointer to the li-th Light.
hepler function to manage enum as underlying types in VariableSet
Definition Cage.cpp:3
Structure passed to each system before they fill the task queue.
Definition FrameInfo.hpp:8