-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCamera.h
40 lines (31 loc) · 777 Bytes
/
Camera.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#pragma once
#include <glm/glm.hpp>
class FSimpleCamera
{
public:
FSimpleCamera();
void MoveForward(float Scale);
void MoveRight(float Scale);
void MouseMove(float X, float Y);
void Update(float DeltaTime);
void Reset();
void SetViewportSize(std::int32_t Width, std::int32_t Height);
glm::mat4 GetView();
glm::mat4 GetProjection();
bool bEnableMouseMovement = false;
glm::vec2 PreviousCursor{ 0.0f };
float ForwardScale = 0.0f;
float RightScale = 0.0f;
glm::vec3 Location;
glm::vec3 Direction;
glm::vec3 Up;
bool bIsOrtho = false;
float FieldOfView = 45.0f;
float AspectRatio = 1.0f;
float Left = 0.0f;
float Right = 1280.0f;
float Bottom = 0.0f;
float Top = 720.0f;
float Near = 0.01f;
float Far = 1000.0f;
};