-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCamera.h
More file actions
38 lines (30 loc) · 715 Bytes
/
Camera.h
File metadata and controls
38 lines (30 loc) · 715 Bytes
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
#pragma once
#include "MathHelper.h"
class Camera
{
private:
// Camera View
matrix4x4 view;
// Camera Projection
matrix4x4 proj;
// Direction
float3 dir;
float fov;
float width;
float height;
float aspectRatio;
float nearZ;
float farZ;
public:
Camera();
// Sets the Camera's Projection
void SetPerspective(float fov, float aspectRatio, float nearZ, float farZ);
void SetCameraView(matrix4x4 dM); // Delta transform
float GetFOV() { return fov; }
float GetAspectRatio() { return aspectRatio; }
float GetNearZ() { return nearZ; }
float GetFarZ() { return farZ; }
matrix4x4 GetProj() { return proj; }
matrix4x4 GetView() { return view; }
float3 GetViewDir() { return dir; }
};