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 namespace glm
00022 {
00023         namespace test{
00024                 void main_gtx_intesect();
00025         }
00026 
00027         namespace gtx{
00029         namespace intersect
00030         {
00033                 template <typename genType>
00034                 bool intersectRayTriangle(
00035                         genType const & orig, genType const & dir,
00036                         genType const & vert0, genType const & vert1, genType const & vert2,
00037                         genType & baryPosition);
00038 
00041                 template <typename genType>
00042                 bool intersectLineTriangle(
00043                         genType const & orig, genType const & dir,
00044                         genType const & vert0, genType const & vert1, genType const & vert2,
00045                         genType & position);
00046 
00049                 template <typename genType>
00050                 bool intersectRaySphere(
00051                         genType const & orig, genType const & dir,
00052                         genType const & center, typename genType::value_type radius,
00053                         genType & position, genType & normal);
00054 
00057                 template <typename genType>
00058                 bool intersectLineSphere(
00059                         genType const & point0, genType const & point1,
00060                         genType const & center, typename genType::value_type radius,
00061                         genType & position, genType & normal);
00062 
00063         }
00064 }
00065 }
00066 
00067 #define GLM_GTX_intersect namespace gtx::intersect
00068 #ifndef GLM_GTX_GLOBAL
00069 namespace glm {using GLM_GTX_intersect;}
00070 #endif//GLM_GTX_GLOBAL
00071 
00072 #include "intersect.inl"
00073 
00074 #endif//glm_gtx_intersect