Grindstone Game Engine v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
CameraComponent.hpp
1#pragma once
2
3#include <glm/glm.hpp>
4#include "EngineCore/Reflection/ComponentReflection.hpp"
5#include "EngineCore/ECS/Entity.hpp"
6
7namespace Grindstone {
8 class BaseRenderer;
9 class WorldContextSet;
10
11 namespace Events {
12 struct BaseEvent;
13 }
14
15 struct CameraComponent {
16 bool isMainCamera = true;
17 bool isOrthographic = false;
18 float nearPlaneDistance = 0.1f;
19 float farPlaneDistance = 200.0f;
20 float fieldOfView = glm::radians(90.0f);
21 float aspectRatio = 800.0f / 600.0f;
22 BaseRenderer* renderer = nullptr;
23
24 bool OnWindowResize(Events::BaseEvent* ev);
25
26 REFLECT("Camera")
27 };
28
29 void SetupCameraComponent(Grindstone::WorldContextSet&, entt::entity);
30 void DestroyCameraComponent(Grindstone::WorldContextSet&, entt::entity);
31}
Definition BaseRenderer.hpp:19
Definition CameraComponent.cs:2
Definition WorldContextSet.hpp:11
Definition BaseEvent.hpp:7