20 #include "../geometric.hpp"
21 #include "../gtx/closest_point.hpp"
22 #include "../gtx/vector_query.hpp"
24 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
25 # pragma message("GLM: GLM_GTX_closest_point extension included")
36 template <
typename genType>
38 genType
const & orig, genType
const & dir,
39 genType
const & planeOrig, genType
const & planeNormal,
40 typename genType::value_type & intersectionDistance);
44 template <
typename genType>
46 genType
const & orig, genType
const & dir,
47 genType
const & vert0, genType
const & vert1, genType
const & vert2,
48 genType & baryPosition);
52 template <
typename genType>
54 genType
const & orig, genType
const & dir,
55 genType
const & vert0, genType
const & vert1, genType
const & vert2,
61 template <
typename genType>
63 genType
const & rayStarting, genType
const & rayNormalizedDirection,
64 genType
const & sphereCenter,
typename genType::value_type
const sphereRadiusSquered,
65 typename genType::value_type & intersectionDistance);
69 template <
typename genType>
71 genType
const & rayStarting, genType
const & rayNormalizedDirection,
72 genType
const & sphereCenter,
const typename genType::value_type sphereRadius,
73 genType & intersectionPosition, genType & intersectionNormal);
77 template <
typename genType>
79 genType
const & point0, genType
const & point1,
80 genType
const & sphereCenter,
typename genType::value_type sphereRadius,
81 genType & intersectionPosition1, genType & intersectionNormal1,
82 genType & intersectionPosition2 = genType(), genType & intersectionNormal2 = genType());
87 #include "intersect.inl"
GLM_FUNC_DECL bool intersectRaySphere(genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, const typename genType::value_type sphereRadius, genType &intersectionPosition, genType &intersectionNormal)
Compute the intersection of a ray and a sphere.
GLM_FUNC_DECL bool intersectRayPlane(genType const &orig, genType const &dir, genType const &planeOrig, genType const &planeNormal, typename genType::value_type &intersectionDistance)
Compute the intersection of a ray and a plane.
GLM_FUNC_DECL bool intersectLineTriangle(genType const &orig, genType const &dir, genType const &vert0, genType const &vert1, genType const &vert2, genType &position)
Compute the intersection of a line and a triangle.
GLM_FUNC_DECL bool intersectLineSphere(genType const &point0, genType const &point1, genType const &sphereCenter, typename genType::value_type sphereRadius, genType &intersectionPosition1, genType &intersectionNormal1, genType &intersectionPosition2=genType(), genType &intersectionNormal2=genType())
Compute the intersection of a line and a sphere.
GLM_FUNC_DECL bool intersectRayTriangle(genType const &orig, genType const &dir, genType const &vert0, genType const &vert1, genType const &vert2, genType &baryPosition)
Compute the intersection of a ray and a triangle.