Radium Engine  1.5.20
Loading...
Searching...
No Matches
CameraComponent.hpp
1#pragma once
2
3#include <Core/Asset/Camera.hpp>
4#include <Core/Math/Math.hpp>
5#include <Core/Types.hpp>
6#include <Engine/RaEngine.hpp>
7#include <Engine/Scene/Component.hpp>
8
9namespace Ra {
10namespace Engine {
11namespace Scene {
12
13class Entity;
14
18class RA_ENGINE_API CameraComponent : public Scene::Component
19{
20 public:
21 CameraComponent( Entity* entity, const std::string& name, Scalar height = 1, Scalar width = 1 );
22
23 ~CameraComponent() override;
24
25 void initialize() override;
26
28 void show( bool on );
29
31 void updateTransform();
32
34 virtual CameraComponent* duplicate( Entity* cloneEntity, const std::string& cloneName ) const;
35
36 Core::Asset::Camera* getCamera() const { return m_camera.get(); }
37 Core::Asset::Camera* getCamera() { return m_camera.get(); }
38 const Rendering::RenderObject* getRenderObject() const { return m_RO; }
39
40 protected:
42 Rendering::RenderObject* m_RO { nullptr };
43};
44} // namespace Scene
45} // namespace Engine
46} // namespace Ra
Camera class storing the Camera frame and the projection properties The view direction is -z in camer...
Definition Camera.hpp:16
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
hepler function to manage enum as underlying types in VariableSet
Definition Cage.cpp:3