1 #ifndef TACOS_PHYSICS_RAY_HPP_
2 #define TACOS_PHYSICS_RAY_HPP_
15 glm::vec3 InverseDirection() const noexcept {
17 std::fabs(direction.x) < std::numeric_limits<float>::epsilon()
18 ? std::numeric_limits<float>::infinity()
20 std::fabs(direction.y) < std::numeric_limits<float>::epsilon()
21 ? std::numeric_limits<float>::infinity()
23 std::fabs(direction.z) < std::numeric_limits<float>::epsilon()
24 ? std::numeric_limits<float>::infinity()
25 : 1.0f / direction.z);
30 /// check whether given ray intersects with the triangle with vertices p0, p1, and p2
31 /// point of intersection is writte to point if the result is positive
32 bool TriangleIntersection(
37 glm::vec3 &point) noexcept;