00001 #ifndef CEP_INTERSECTION_PLANE_3_TRIANGLE_3_H // -*- C++ -*-
00002 #define CEP_INTERSECTION_PLANE_3_TRIANGLE_3_H
00003
00004 #include <CGAL/Plane_3.h>
00005 #include <CGAL/Triangle_3.h>
00006 #include <CGAL/Object.h>
00007
00008
00009 namespace CEP {
00010 namespace intersection {
00011
00012 using CGAL::Point_3;
00013 using CGAL::Plane_3;
00014 using CGAL::Triangle_3;
00015
00016
00017 namespace Plane_3_Triangle_3 {
00018
00020 template <class R>
00021 bool
00022 do_intersect( const Plane_3<R>& plane,
00023 const Point_3<R>& p,
00024 const Point_3<R>& q,
00025 const Point_3<R>& r );
00026
00027
00029 template <class R>
00030 CGAL::Object
00031 intersection( const Plane_3<R>& plane,
00032 const Point_3<R>& p,
00033 const Point_3<R>& q,
00034 const Point_3<R>& r );
00035 }
00036
00037
00039
00044 template <class R>
00045 inline CGAL::Object
00046 intersection(const Plane_3<R>& plane, const Triangle_3<R>& triangle)
00047 {
00048 return Plane_3_Triangle_3::intersection( plane,
00049 triangle[0],
00050 triangle[1],
00051 triangle[2] );
00052 }
00053
00054
00056
00060 template <class R>
00061 inline bool
00062 do_intersect( const Plane_3<R>& plane, const Triangle_3<R>& triangle )
00063 {
00064 return Plane_3_Triangle_3::do_intersect( plane,
00065 triangle[0],
00066 triangle[1],
00067 triangle[2] );
00068 }
00069
00070
00071 }
00072 }
00073
00074
00075 #ifdef CGAL_CFG_NO_AUTOMATIC_TEMPLATE_INCLUSION
00076 # include <CEP/intersection/Plane_3_Triangle_3.C>
00077 #endif
00078
00079 #endif