Radium Engine  1.5.0
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 
9 namespace Ra {
10 namespace Engine {
11 namespace Scene {
12 
17 class 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:
77  std::unique_ptr<LightStorage> m_data { nullptr };
78 };
79 
80 } // namespace Scene
81 } // namespace Engine
82 } // namespace Ra
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.
Definition: Cage.cpp:3
Structure passed to each system before they fill the task queue.
Definition: FrameInfo.hpp:8