Function inexor::vulkan_renderer::world::ray_box_collision

Function Documentation

bool inexor::vulkan_renderer::world::ray_box_collision(std::array<glm::vec3, 2> &box_bounds, glm::vec3 &pos, glm::vec3 &dir)

True of the ray build from the two vectors collides with the cube’s bounding box.


There is no such function as glm::intersectRayBox.

  • box_bounds – An array of two vectors which represent the edges of the bounding box.

  • pos – The start position of the ray.

  • dir – The direction of the ray.


True if the ray collides with the octree cube’s bounding box.