summaryrefslogtreecommitdiff
path: root/gfx/gl/camera.h
blob: 90d88a3b9ab33b00197a45b271cf27d6444c1fb7 (plain)
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
#ifndef CAMERA_INCLUDED_H
#define CAMERA_INCLUDED_H

#include <glm/glm.hpp>

class Camera {
public:
	Camera(glm::vec3 pos, float fov, float aspect, float zNear, float zFar);

	[[nodiscard]] glm::mat4 GetViewProjection() const;

	void MoveForward(float amt);
	void SlideForward(float amt);
	void MoveRight(float amt);
	void Pitch(float angle);
	void RotateY(float angle);

private:
	glm::mat4 projection;
	glm::vec3 pos;
	glm::vec3 forward;
	glm::vec3 up;
};

#endif