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.

Note

There is no such function as glm::intersectRayBox.

Parameters
  • 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.

Returns

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