summaryrefslogtreecommitdiff
path: root/gfx/gl/camera.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-01-02 21:07:37 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2022-01-02 21:07:37 +0000
commit7c8b8a39fd36e190578587d8d92f28f460a1fc4b (patch)
tree03c0943bcec657992aa92afb91a3613eb1c8423b /gfx/gl/camera.h
parentNo need to pass GameState around, it has a global pointer (diff)
downloadilt-7c8b8a39fd36e190578587d8d92f28f460a1fc4b.tar.bz2
ilt-7c8b8a39fd36e190578587d8d92f28f460a1fc4b.tar.xz
ilt-7c8b8a39fd36e190578587d8d92f28f460a1fc4b.zip
Encapsulate Ray
Diffstat (limited to 'gfx/gl/camera.h')
-rw-r--r--gfx/gl/camera.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gfx/gl/camera.h b/gfx/gl/camera.h
index 9fbb0a1..b4dd0d5 100644
--- a/gfx/gl/camera.h
+++ b/gfx/gl/camera.h
@@ -1,13 +1,14 @@
#pragma once
#include <glm/glm.hpp>
+#include <ray.hpp>
class Camera {
public:
Camera(glm::vec3 pos, float fov, float aspect, float zNear, float zFar);
[[nodiscard]] glm::mat4 GetViewProjection() const;
- [[nodiscard]] glm::vec3 unProject(const glm::vec2 &) const;
+ [[nodiscard]] Ray unProject(const glm::vec2 &) const;
glm::vec3 pos;
glm::vec3 forward;