CoriEngine
Loading...
Searching...
No Matches
CameraComponent.hpp
Go to the documentation of this file.
1#pragma once
2#include "Utility/AABB.hpp"
3
4namespace Cori {
5 namespace World {
6 namespace Components {
10 namespace Scene {
14 struct Camera {
15 static constexpr auto in_place_delete = true;
16
17 glm::mat4 m_ProjectionMatrix{ 1.0f };
18 glm::mat4 m_ViewProjectionMatrix{ 1.0f };
19 glm::vec2 m_CameraPosition{ 0.0f };
20 float m_CameraRotation{ 0.0f };
21 glm::vec2 m_CameraScale{ 1.0f };
22 glm::vec2 m_InitialCameraMinBound{ 0.0f };
23 glm::vec2 m_InitialCameraMaxBound{ 0.0f };
25 glm::vec2 m_CameraSize{ 0.0f };
26 Camera() = default;
27 Camera(const glm::mat4& projectionMatrix, const glm::mat4& viewProjectionMatrix, const glm::vec2& cameraPosition, const float cameraRotation, const glm::vec2 cameraScale)
28 : m_ProjectionMatrix(projectionMatrix), m_ViewProjectionMatrix(viewProjectionMatrix), m_CameraPosition(cameraPosition), m_CameraRotation(cameraRotation), m_CameraScale(cameraScale) {
29 }
30 };
31 }
32 }
33 }
34}
Components designed to be used with scenes.
Components that are used with the WorldSystem (ECS).
Anything connected to WorldSystem (ECS) is in this namespace.
Global engine namespace.
Axis-Aligned bounding box.
Definition AABB.hpp:11
Camera(const glm::mat4 &projectionMatrix, const glm::mat4 &viewProjectionMatrix, const glm::vec2 &cameraPosition, const float cameraRotation, const glm::vec2 cameraScale)