00001
00002
00004
00005
00006
00007
00009
00010
00011
00013
00014 #ifndef glm_gtx_intersect
00015 #define glm_gtx_intersect
00016
00017
00018 #include "../glm.hpp"
00019 #include "../gtx/closest_point.hpp"
00020
00021 #if(defined(GLM_MESSAGES) && !defined(glm_ext))
00022 # pragma message("GLM: GLM_GTX_closest_point extension included")
00023 #endif
00024
00025 namespace glm{
00026 namespace gtx{
00027 namespace intersect
00028 {
00031
00034 template <typename genType>
00035 bool intersectRayTriangle(
00036 genType const & orig, genType const & dir,
00037 genType const & vert0, genType const & vert1, genType const & vert2,
00038 genType & baryPosition);
00039
00042 template <typename genType>
00043 bool intersectLineTriangle(
00044 genType const & orig, genType const & dir,
00045 genType const & vert0, genType const & vert1, genType const & vert2,
00046 genType & position);
00047
00050 template <typename genType>
00051 bool intersectRaySphere(
00052 genType const & orig, genType const & dir,
00053 genType const & center, typename genType::value_type radius,
00054 genType & position, genType & normal);
00055
00058 template <typename genType>
00059 bool intersectLineSphere(
00060 genType const & point0, genType const & point1,
00061 genType const & center, typename genType::value_type radius,
00062 genType & position, genType & normal);
00063
00065 }
00066 }
00067 }
00068
00069 #include "intersect.inl"
00070
00071 namespace glm{using namespace gtx::intersect;}
00072
00073 #endif//glm_gtx_intersect