GLM Version 0.9.0

intersect.hpp

00001 
00002 // OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
00004 // Created : 2007-04-03
00005 // Updated : 2009-01-20
00006 // Licence : This source is under MIT License
00007 // File    : glm/gtx/intersect.hpp
00009 // Dependency:
00010 // - GLM core
00011 // - GLM_GTX_closest_point
00013 
00014 #ifndef glm_gtx_intersect
00015 #define glm_gtx_intersect
00016 
00017 // Dependency:
00018 #include "../glm.hpp"
00019 #include "../gtx/closest_point.hpp"
00020 
00021 namespace glm
00022 {
00023         namespace test{
00024                 void main_gtx_intesect();
00025         }//namespace test
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         }//namespace intersect
00064 }//namespace gtx
00065 }//namespace glm
00066 
00067 #include "intersect.inl"
00068 
00069 namespace glm{using namespace gtx::intersect;}
00070 
00071 #endif//glm_gtx_intersect