2#include <Core/Utils/Observable.hpp>
4#include <Engine/RaEngine.hpp>
5#include <Engine/Scene/CameraStorage.hpp>
6#include <Engine/Scene/System.hpp>
47 virtual Core::Utils::Index getCameraIndex(
const CameraComponent* cam );
50 virtual void initialize();
59 void activate( Core::Utils::Index index );
62 void updateActiveCameraData();
71 virtual size_t count()
const;
78 void handleAssetLoading(
Entity* entity,
const Core::Asset::FileData* data )
override;
92 m_activeCamera = defaultCamera;
94 m_activeCameraObservers.notify( m_activeIndex );
99 return m_activeCameraObservers;
106 void registerComponent(
const Entity* entity,
Component* component )
final;
110 void unregisterComponent(
const Entity* entity,
Component* component )
final;
114 void unregisterAllComponents(
const Entity* entity )
final;
Camera class storing the Camera frame and the projection properties The view direction is -z in camer...
This class allows tasks to be registered and then executed in parallel on separate threads.
~CameraManager() override=default
Virtual destructor.
void resetActiveCamera()
reset the active camera data to default camera
Core::Utils::Index m_activeIndex
active camera index
Ra::Core::Asset::Camera * getActiveCamera()
Get the pointer on the active camera data.
Core::Utils::Index getActiveCameraIndex() const
Get the index of the currently active camera.
Core::Utils::Observable< Core::Utils::Index > m_activeCameraObservers
Observers on active camera changes.
Ra::Core::Asset::Camera m_activeCamera
active camera data, active camera hasn't any component just pure data.
virtual const CameraComponent * getCamera(size_t i) const =0
Get a pointer to the i-th Camera.
virtual void addCamera(CameraComponent *cam)=0
Add a Camera to the manager ...
static Ra::Core::Asset::Camera defaultCamera
Core::Utils::Observable< Core::Utils::Index > & activeCameraObservers()
get a ref to active camera observers to add/remove an observer
A component is an element that can be updated by a system. It is also linked to some other components...
An entity is an scene element. It ties together components with a transform.
hepler function to manage enum as underlying types in VariableSet
Structure passed to each system before they fill the task queue.