]> git.localhorst.tv Git - tacos.git/blobdiff - src/world/Floor.hpp
mouse cursor mockup
[tacos.git] / src / world / Floor.hpp
index a7046b589c64f42bf4c6e4baa0a9e19660c8f156..0ecd6ed0aae384b88380db38eef19d98abc0e868 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef TACOS_WORLD_FLOOR_HPP_
 #define TACOS_WORLD_FLOOR_HPP_
 
+#include "../physics/ray.hpp"
+
 #include <vector>
 #include <GL/glew.h>
 #include <glm/glm.hpp>
@@ -45,6 +47,9 @@ public:
 
        void GenerateVertices();
 
+       /// check if ray intersects floor, write point of intersection to point
+       bool Intersection(const Ray &ray, glm::vec3 &point);
+
 private:
        void SetupVAO(int which, GLuint element_buffer, int vertex_count) noexcept;
        void FillElementBuffer(GLuint which, int tile_width, int tile_depth);