summaryrefslogtreecommitdiff
path: root/lib/ray.hpp
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 /lib/ray.hpp
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 'lib/ray.hpp')
-rw-r--r--lib/ray.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/ray.hpp b/lib/ray.hpp
new file mode 100644
index 0000000..4c0710a
--- /dev/null
+++ b/lib/ray.hpp
@@ -0,0 +1,11 @@
+#pragma once
+
+#include <glm/glm.hpp>
+
+class Ray {
+public:
+ Ray(glm::vec3 start, glm::vec3 direction) : start {start}, direction {direction} { }
+
+ glm::vec3 start;
+ glm::vec3 direction;
+};