Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #pragma once
00040
00041
00042 #include "../glm.hpp"
00043 #include "../gtx/closest_point.hpp"
00044
00045 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
00046 # pragma message("GLM: GLM_GTX_closest_point extension included")
00047 #endif
00048
00049 namespace glm
00050 {
00053
00057 template <typename genType>
00058 GLM_FUNC_DECL bool intersectRayPlane(
00059 genType const & orig, genType const & dir,
00060 genType const & planeOrig, genType const & planeNormal,
00061 typename genType::value_type & intersectionDistance);
00062
00065 template <typename genType>
00066 GLM_FUNC_DECL bool intersectRayTriangle(
00067 genType const & orig, genType const & dir,
00068 genType const & vert0, genType const & vert1, genType const & vert2,
00069 genType & baryPosition);
00070
00073 template <typename genType>
00074 GLM_FUNC_DECL bool intersectLineTriangle(
00075 genType const & orig, genType const & dir,
00076 genType const & vert0, genType const & vert1, genType const & vert2,
00077 genType & position);
00078
00082 template <typename genType>
00083 GLM_FUNC_DECL bool intersectRaySphere(
00084 genType const & rayStarting, genType const & rayNormalizedDirection,
00085 genType const & sphereCenter, typename genType::value_type const sphereRadiusSquered,
00086 typename genType::value_type & intersectionDistance);
00087
00090 template <typename genType>
00091 GLM_FUNC_DECL bool intersectRaySphere(
00092 genType const & rayStarting, genType const & rayNormalizedDirection,
00093 genType const & sphereCenter, const typename genType::value_type sphereRadius,
00094 genType & intersectionPosition, genType & intersectionNormal);
00095
00098 template <typename genType>
00099 GLM_FUNC_DECL bool intersectLineSphere(
00100 genType const & point0, genType const & point1,
00101 genType const & sphereCenter, typename genType::value_type sphereRadius,
00102 genType & intersectionPosition1, genType & intersectionNormal1,
00103 genType & intersectionPosition2 = genType(), genType & intersectionNormal2 = genType());
00104
00106 }
00107
00108 #include "intersect.inl"