From 0bf4ad9e4a9e1c97e92aa23a365405dfef89bd7c Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 17 Jan 2021 19:36:30 +0000 Subject: Big reshuffle Fixes code quality warnings now picked up. --- gfx/gl/camera.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 gfx/gl/camera.h (limited to 'gfx/gl/camera.h') diff --git a/gfx/gl/camera.h b/gfx/gl/camera.h new file mode 100644 index 0000000..fa4296d --- /dev/null +++ b/gfx/gl/camera.h @@ -0,0 +1,24 @@ +#ifndef CAMERA_INCLUDED_H +#define CAMERA_INCLUDED_H + +#include + +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 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 -- cgit v1.2.3