X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2FFloor.hpp;fp=src%2Fworld%2FFloor.hpp;h=0ecd6ed0aae384b88380db38eef19d98abc0e868;hb=2e761a60d1717297b7e308ef1b66e2a81319fdff;hp=a7046b589c64f42bf4c6e4baa0a9e19660c8f156;hpb=33346e9a5c58e92e4d7cc7cb542cf5abb7ffeb25;p=tacos.git diff --git a/src/world/Floor.hpp b/src/world/Floor.hpp index a7046b5..0ecd6ed 100644 --- a/src/world/Floor.hpp +++ b/src/world/Floor.hpp @@ -1,6 +1,8 @@ #ifndef TACOS_WORLD_FLOOR_HPP_ #define TACOS_WORLD_FLOOR_HPP_ +#include "../physics/ray.hpp" + #include #include #include @@ -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);