Loading [MathJax]/extensions/TeX/AMSmath.js
Radium Engine  1.6.3
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LightManager.hpp
1#pragma once
2
3#include <Engine/RaEngine.hpp>
4#include <Engine/Scene/LightStorage.hpp>
5#include <Engine/Scene/System.hpp>
6#include <memory>
7
8namespace Ra {
9namespace Core {
10class TaskQueue;
11namespace Asset {
12class FileData;
13} // namespace Asset
14} // namespace Core
15
16namespace Engine {
17struct FrameInfo;
18
19namespace Scene {
20class Component;
21class Entity;
22class Light;
23
28class RA_ENGINE_API LightManager : public System
29{
30 // Radium-V2 : make light manager compatible with range for ...
31 public:
33 LightManager() = default;
34
35 // Make copies impossible
36 LightManager( const LightManager& ) = delete;
37 LightManager& operator=( const LightManager& ) = delete;
38
40 ~LightManager() override;
41
43 virtual const Scene::Light* getLight( size_t li ) const = 0;
44
50 virtual void addLight( const Scene::Light* li ) = 0;
51
52 //
53 // Calls for the Renderer. Note that
54 //
55
62 virtual size_t count() const;
63
64 //
65 // System methods
66 //
68 void generateTasks( Core::TaskQueue* taskQueue, const Engine::FrameInfo& frameInfo ) override;
69
71 void handleAssetLoading( Entity* entity, const Core::Asset::FileData* data ) override;
72
73 protected:
76 void registerComponent( const Entity* entity, Component* component ) final;
77
80 void unregisterComponent( const Entity* entity, Component* component ) final;
81
84 void unregisterAllComponents( const Entity* entity ) final;
85
86 protected:
89};
90
91} // namespace Scene
92} // namespace Engine
93} // namespace Ra
This class allows tasks to be registered and then executed in parallel on separate threads.
Definition TaskQueue.hpp:50
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:4
Structure passed to each system before they fill the task queue.
Definition FrameInfo.hpp:8