aboutsummaryrefslogtreecommitdiff
path: root/source/Camera.hpp
diff options
context:
space:
mode:
authorhnOsmium0001 <[email protected]>2022-04-25 20:22:07 -0700
committerhnOsmium0001 <[email protected]>2022-04-25 20:22:07 -0700
commitf54370de7e4214cb7813d26b1a39a8f6e42b7b56 (patch)
tree20913b4099b77af933fcd2ebb4e73f53b366ad8f /source/Camera.hpp
parentc8ebee643f23c34ff57f69f8dfcf1903b59ea9d1 (diff)
Initial work on rendering sprites to screen
Diffstat (limited to 'source/Camera.hpp')
-rw-r--r--source/Camera.hpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/Camera.hpp b/source/Camera.hpp
new file mode 100644
index 0000000..d203622
--- /dev/null
+++ b/source/Camera.hpp
@@ -0,0 +1,20 @@
+#pragma once
+
+#include <glm/glm.hpp>
+
+class Camera {
+public:
+ glm::vec3 pos;
+ glm::vec3 lookAt;
+ bool perspective = false;
+
+public:
+ void Move(glm::vec3 pos);
+ void LookAt(glm::vec3 pos);
+
+ bool HasPerspective() const { return perspective; }
+ void SetHasPerspective(bool perspective);
+
+ glm::mat4 CalcViewMatrix() const;
+ glm::mat4 CalcProjectionMatrix() const;
+};