mirror of https://github.com/CGAL/cgal
Merge pull request #2792 from afabri/Intersections_3-Add_missing_do_intersect-GF
Intersections_3: Add missing do_intersect() overloads
This commit is contained in:
commit
6ffd76a87e
|
|
@ -16,3 +16,4 @@ Property_map
|
||||||
STL_Extension
|
STL_Extension
|
||||||
Spatial_searching
|
Spatial_searching
|
||||||
Stream_support
|
Stream_support
|
||||||
|
Distance_3
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,7 @@ namespace internal {
|
||||||
// the circles intersect
|
// the circles intersect
|
||||||
|
|
||||||
const std::pair<typename CK::Circular_arc_point_2, unsigned>*
|
const std::pair<typename CK::Circular_arc_point_2, unsigned>*
|
||||||
result = CGAL::internal::intersect_get< std::pair<typename CK::Circular_arc_point_2, unsigned> >(*it);
|
result = CGAL::Intersections::internal::intersect_get< std::pair<typename CK::Circular_arc_point_2, unsigned> >(*it);
|
||||||
if ( result->second == 2 ){ // double solution
|
if ( result->second == 2 ){ // double solution
|
||||||
_begin = result->first;
|
_begin = result->first;
|
||||||
_end = result->first;
|
_end = result->first;
|
||||||
|
|
@ -202,7 +202,7 @@ namespace internal {
|
||||||
_end = result->first;
|
_end = result->first;
|
||||||
if (!(b_1 && b_2)) {
|
if (!(b_1 && b_2)) {
|
||||||
++it;
|
++it;
|
||||||
result = CGAL::internal::intersect_get< std::pair<typename CK::Circular_arc_point_2, unsigned> >(*it);
|
result = CGAL::Intersections::internal::intersect_get< std::pair<typename CK::Circular_arc_point_2, unsigned> >(*it);
|
||||||
if (!b_1)
|
if (!b_1)
|
||||||
_begin = result->first;
|
_begin = result->first;
|
||||||
if (!b_2)
|
if (!b_2)
|
||||||
|
|
|
||||||
|
|
@ -92,13 +92,13 @@ public:
|
||||||
// the circles intersect
|
// the circles intersect
|
||||||
|
|
||||||
const std::pair<typename CK::Circular_arc_point_2, unsigned>*
|
const std::pair<typename CK::Circular_arc_point_2, unsigned>*
|
||||||
result = CGAL::internal::intersect_get<std::pair<typename CK::Circular_arc_point_2, unsigned> >(*it);
|
result = CGAL::Intersections::internal::intersect_get<std::pair<typename CK::Circular_arc_point_2, unsigned> >(*it);
|
||||||
// get must have succeeded
|
// get must have succeeded
|
||||||
if ( result->second == 2 ) // double solution
|
if ( result->second == 2 ) // double solution
|
||||||
return result->first;
|
return result->first;
|
||||||
if (b) return result->first;
|
if (b) return result->first;
|
||||||
++it;
|
++it;
|
||||||
result = CGAL::internal::intersect_get<std::pair<typename CK::Circular_arc_point_2, unsigned> >(*it);
|
result = CGAL::Intersections::internal::intersect_get<std::pair<typename CK::Circular_arc_point_2, unsigned> >(*it);
|
||||||
return result->first;
|
return result->first;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -136,14 +136,14 @@ public:
|
||||||
CGAL_kernel_precondition(do_intersect(support, l2));
|
CGAL_kernel_precondition(do_intersect(support, l2));
|
||||||
//typedef typename Root_of_2::RT RT_2;
|
//typedef typename Root_of_2::RT RT_2;
|
||||||
typename Intersection_traits<CK, Line_2, Line_2>::result_type
|
typename Intersection_traits<CK, Line_2, Line_2>::result_type
|
||||||
v = CGAL::internal::intersection(support, l1, CK());
|
v = CGAL::Intersections::internal::intersection(support, l1, CK());
|
||||||
CGAL_assertion(bool(v));
|
CGAL_assertion(bool(v));
|
||||||
|
|
||||||
const Point_2 *pt = CGAL::internal::intersect_get<Point_2>(v);
|
const Point_2 *pt = CGAL::Intersections::internal::intersect_get<Point_2>(v);
|
||||||
CGAL_assertion(pt != NULL);
|
CGAL_assertion(pt != NULL);
|
||||||
_begin = Circular_arc_point_2(*pt);
|
_begin = Circular_arc_point_2(*pt);
|
||||||
v = CGAL::internal::intersection(support, l2, CK());
|
v = CGAL::Intersections::internal::intersection(support, l2, CK());
|
||||||
const Point_2 *pt2 = CGAL::internal::intersect_get<Point_2>(v);
|
const Point_2 *pt2 = CGAL::Intersections::internal::intersect_get<Point_2>(v);
|
||||||
CGAL_assertion(pt2 != NULL);
|
CGAL_assertion(pt2 != NULL);
|
||||||
_end = Circular_arc_point_2(*pt2);
|
_end = Circular_arc_point_2(*pt2);
|
||||||
reset_flags();
|
reset_flags();
|
||||||
|
|
|
||||||
|
|
@ -508,7 +508,7 @@ namespace CircularFunctors {
|
||||||
template <class T1, class T2>
|
template <class T1, class T2>
|
||||||
result_type
|
result_type
|
||||||
operator()(const T1& t1, const T2& t2) const
|
operator()(const T1& t1, const T2& t2) const
|
||||||
{ return internal::do_intersect(t1, t2, CK()); }
|
{ return Intersections::internal::do_intersect(t1, t2, CK()); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template < class CK >
|
template < class CK >
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ circle_intersect( const typename CK::Circle_2 & c1,
|
||||||
// the circles intersect
|
// the circles intersect
|
||||||
|
|
||||||
const std::pair<typename CK::Circular_arc_point_2, unsigned>*
|
const std::pair<typename CK::Circular_arc_point_2, unsigned>*
|
||||||
result = internal::intersect_get<std::pair<typename CK::Circular_arc_point_2, unsigned> > (*it);
|
result = Intersections::internal::intersect_get<std::pair<typename CK::Circular_arc_point_2, unsigned> > (*it);
|
||||||
|
|
||||||
if ( result->second == 2 ) // double solution
|
if ( result->second == 2 ) // double solution
|
||||||
return result->first;
|
return result->first;
|
||||||
|
|
@ -63,7 +63,7 @@ circle_intersect( const typename CK::Circle_2 & c1,
|
||||||
return result->first;
|
return result->first;
|
||||||
|
|
||||||
++it;
|
++it;
|
||||||
result = internal::intersect_get<std::pair<typename CK::Circular_arc_point_2, unsigned> > (*it);
|
result = Intersections::internal::intersect_get<std::pair<typename CK::Circular_arc_point_2, unsigned> > (*it);
|
||||||
|
|
||||||
return result->first;
|
return result->first;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -488,10 +488,10 @@ namespace CircularFunctors {
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Intersection_traits<CK, typename CK::Line_2, typename CK::Line_2>::result_type
|
typename Intersection_traits<CK, typename CK::Line_2, typename CK::Line_2>::result_type
|
||||||
v = CGAL::internal::intersection(a1.supporting_line(), a2.supporting_line(), CK());
|
v = CGAL::Intersections::internal::intersection(a1.supporting_line(), a2.supporting_line(), CK());
|
||||||
if(!v) return res;
|
if(!v) return res;
|
||||||
|
|
||||||
const Point_2 *pt = CGAL::internal::intersect_get<Point_2>(v);
|
const Point_2 *pt = CGAL::Intersections::internal::intersect_get<Point_2>(v);
|
||||||
if(pt == NULL) return res;
|
if(pt == NULL) return res;
|
||||||
Circular_arc_point_2 intersect_point = Circular_arc_point_2(*pt);
|
Circular_arc_point_2 intersect_point = Circular_arc_point_2(*pt);
|
||||||
// (Root_for_circles_2_2(Root_of_2(pt->x()),Root_of_2(pt->y())));
|
// (Root_for_circles_2_2(Root_of_2(pt->x()),Root_of_2(pt->y())));
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ intersection(const A <K> &c1, const B <K> &c2, OutputIterator res) \
|
||||||
{ \
|
{ \
|
||||||
return typename K::Intersect_2()(c1, c2, res); \
|
return typename K::Intersect_2()(c1, c2, res); \
|
||||||
} \
|
} \
|
||||||
|
namespace Intersections { \
|
||||||
namespace internal { \
|
namespace internal { \
|
||||||
template <class K> \
|
template <class K> \
|
||||||
inline \
|
inline \
|
||||||
|
|
@ -59,6 +60,7 @@ namespace internal { \
|
||||||
return !res.empty(); \
|
return !res.empty(); \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
|
} \
|
||||||
template <class K> \
|
template <class K> \
|
||||||
inline \
|
inline \
|
||||||
bool \
|
bool \
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@
|
||||||
#include <CGAL/Algebraic_kernel_for_circles_2_2.h>
|
#include <CGAL/Algebraic_kernel_for_circles_2_2.h>
|
||||||
#include <CGAL/MP_Float.h>
|
#include <CGAL/MP_Float.h>
|
||||||
#include <CGAL/Quotient.h>
|
#include <CGAL/Quotient.h>
|
||||||
#include <CGAL/Circular_kernel_2/function_objects_polynomial_circular.h>
|
|
||||||
#include <CGAL/Circular_kernel_2/Circular_arc_2.h>
|
#include <CGAL/Circular_kernel_2/Circular_arc_2.h>
|
||||||
#include <CGAL/Circular_kernel_2/Line_arc_2.h>
|
#include <CGAL/Circular_kernel_2/Line_arc_2.h>
|
||||||
#include <CGAL/Exact_circular_kernel_2.h>
|
#include <CGAL/Exact_circular_kernel_2.h>
|
||||||
|
|
|
||||||
|
|
@ -130,8 +130,8 @@ namespace CGAL {
|
||||||
intersect_3<SK>(circle,plane,std::back_inserter(inters));
|
intersect_3<SK>(circle,plane,std::back_inserter(inters));
|
||||||
CGAL_kernel_precondition(inters.size()==2);
|
CGAL_kernel_precondition(inters.size()==2);
|
||||||
const std::pair<typename SK::Circular_arc_point_3,unsigned>* pt[2]={NULL,NULL};
|
const std::pair<typename SK::Circular_arc_point_3,unsigned>* pt[2]={NULL,NULL};
|
||||||
pt[0]=CGAL::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[0]);
|
pt[0]=CGAL::Intersections::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[0]);
|
||||||
pt[1]=CGAL::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[1]);
|
pt[1]=CGAL::Intersections::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[1]);
|
||||||
CGAL_kernel_precondition(pt[0]!=NULL);
|
CGAL_kernel_precondition(pt[0]!=NULL);
|
||||||
CGAL_kernel_precondition(pt[1]!=NULL);
|
CGAL_kernel_precondition(pt[1]!=NULL);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -103,12 +103,12 @@ namespace CGAL {
|
||||||
std::back_inserter(solutions) );
|
std::back_inserter(solutions) );
|
||||||
if(solutions.size() == 0) return res;
|
if(solutions.size() == 0) return res;
|
||||||
if(solutions.size() == 1) {
|
if(solutions.size() == 1) {
|
||||||
const Solution& sol=*CGAL::internal::intersect_get<Solution>(solutions[0]);
|
const Solution& sol=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
|
||||||
if(SK().has_on_3_object()(ca,sol.first,true))
|
if(SK().has_on_3_object()(ca,sol.first,true))
|
||||||
*res++ = solutions[0];
|
*res++ = solutions[0];
|
||||||
} else {
|
} else {
|
||||||
const Solution& sol1=*CGAL::internal::intersect_get<Solution>(solutions[0]);
|
const Solution& sol1=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
|
||||||
const Solution& sol2=*CGAL::internal::intersect_get<Solution>(solutions[1]);
|
const Solution& sol2=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[1]);
|
||||||
if(SK().has_on_3_object()(ca,sol1.first,true))
|
if(SK().has_on_3_object()(ca,sol1.first,true))
|
||||||
*res++ = solutions[0];
|
*res++ = solutions[0];
|
||||||
if(SK().has_on_3_object()(ca,sol2.first,true))
|
if(SK().has_on_3_object()(ca,sol2.first,true))
|
||||||
|
|
@ -140,12 +140,12 @@ namespace CGAL {
|
||||||
std::back_inserter(solutions) );
|
std::back_inserter(solutions) );
|
||||||
if(solutions.size() == 0) return res;
|
if(solutions.size() == 0) return res;
|
||||||
if(solutions.size() == 1) {
|
if(solutions.size() == 1) {
|
||||||
const Solution& sol=*CGAL::internal::intersect_get<Solution>(solutions[0]);
|
const Solution& sol=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
|
||||||
if(SK().has_on_3_object()(ca,sol.first,true))
|
if(SK().has_on_3_object()(ca,sol.first,true))
|
||||||
*res++ = solutions[0];
|
*res++ = solutions[0];
|
||||||
} else {
|
} else {
|
||||||
const Solution& sol1=*CGAL::internal::intersect_get<Solution>(solutions[0]);
|
const Solution& sol1=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
|
||||||
const Solution& sol2=*CGAL::internal::intersect_get<Solution>(solutions[1]);
|
const Solution& sol2=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[1]);
|
||||||
if(SK().has_on_3_object()(ca,sol1.first,true))
|
if(SK().has_on_3_object()(ca,sol1.first,true))
|
||||||
*res++ = solutions[0];
|
*res++ = solutions[0];
|
||||||
if(SK().has_on_3_object()(ca,sol2.first,true))
|
if(SK().has_on_3_object()(ca,sol2.first,true))
|
||||||
|
|
@ -178,12 +178,12 @@ namespace CGAL {
|
||||||
std::back_inserter(solutions) );
|
std::back_inserter(solutions) );
|
||||||
if(solutions.size() == 0) return res;
|
if(solutions.size() == 0) return res;
|
||||||
if(solutions.size() == 1) {
|
if(solutions.size() == 1) {
|
||||||
const Solution& sol=*CGAL::internal::intersect_get<Solution>(solutions[0]);
|
const Solution& sol=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
|
||||||
if(SK().has_on_3_object()(c,sol.first,true))
|
if(SK().has_on_3_object()(c,sol.first,true))
|
||||||
*res++ = solutions[0];
|
*res++ = solutions[0];
|
||||||
} else {
|
} else {
|
||||||
const Solution& sol1=*CGAL::internal::intersect_get<Solution>(solutions[0]);
|
const Solution& sol1=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
|
||||||
const Solution& sol2=*CGAL::internal::intersect_get<Solution>(solutions[1]);
|
const Solution& sol2=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[1]);
|
||||||
if(SK().has_on_3_object()(c,sol1.first,true))
|
if(SK().has_on_3_object()(c,sol1.first,true))
|
||||||
*res++ = solutions[0];
|
*res++ = solutions[0];
|
||||||
if(SK().has_on_3_object()(c,sol2.first,true))
|
if(SK().has_on_3_object()(c,sol2.first,true))
|
||||||
|
|
@ -215,12 +215,12 @@ namespace CGAL {
|
||||||
std::back_inserter(solutions) );
|
std::back_inserter(solutions) );
|
||||||
if(solutions.size() == 0) return res;
|
if(solutions.size() == 0) return res;
|
||||||
if(solutions.size() == 1) {
|
if(solutions.size() == 1) {
|
||||||
const Solution& sol=*CGAL::internal::intersect_get<Solution>(solutions[0]);
|
const Solution& sol=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
|
||||||
if(SK().has_on_3_object()(ca,sol.first,true))
|
if(SK().has_on_3_object()(ca,sol.first,true))
|
||||||
*res++ = CGAL::internal::sk3_intersection_return<result_type>(sol);
|
*res++ = CGAL::internal::sk3_intersection_return<result_type>(sol);
|
||||||
} else {
|
} else {
|
||||||
const Solution& sol1=*CGAL::internal::intersect_get<Solution>(solutions[0]);
|
const Solution& sol1=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
|
||||||
const Solution& sol2=*CGAL::internal::intersect_get<Solution>(solutions[1]);
|
const Solution& sol2=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[1]);
|
||||||
if(SK().has_on_3_object()(ca,sol1.first,true))
|
if(SK().has_on_3_object()(ca,sol1.first,true))
|
||||||
*res++ = CGAL::internal::sk3_intersection_return<result_type>(sol1);
|
*res++ = CGAL::internal::sk3_intersection_return<result_type>(sol1);
|
||||||
if(SK().has_on_3_object()(ca,sol2.first,true))
|
if(SK().has_on_3_object()(ca,sol2.first,true))
|
||||||
|
|
@ -247,13 +247,13 @@ namespace CGAL {
|
||||||
std::back_inserter(solutions) );
|
std::back_inserter(solutions) );
|
||||||
if(solutions.size() == 0) return res;
|
if(solutions.size() == 0) return res;
|
||||||
if(solutions.size() == 1) {
|
if(solutions.size() == 1) {
|
||||||
const Solution& sol=*CGAL::internal::intersect_get<Solution>(solutions[0]);
|
const Solution& sol=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
|
||||||
if(SK().has_on_3_object()(ca,sol.first,true) &&
|
if(SK().has_on_3_object()(ca,sol.first,true) &&
|
||||||
SK().has_on_3_object()(la,sol.first,true))
|
SK().has_on_3_object()(la,sol.first,true))
|
||||||
*res++ = solutions[0];
|
*res++ = solutions[0];
|
||||||
} else {
|
} else {
|
||||||
const Solution& sol1=*CGAL::internal::intersect_get<Solution>(solutions[0]);
|
const Solution& sol1=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
|
||||||
const Solution& sol2=*CGAL::internal::intersect_get<Solution>(solutions[1]);
|
const Solution& sol2=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[1]);
|
||||||
if(SK().has_on_3_object()(ca,sol1.first,true) &&
|
if(SK().has_on_3_object()(ca,sol1.first,true) &&
|
||||||
SK().has_on_3_object()(la,sol1.first,true))
|
SK().has_on_3_object()(la,sol1.first,true))
|
||||||
*res++ = solutions[0];
|
*res++ = solutions[0];
|
||||||
|
|
@ -359,13 +359,13 @@ namespace CGAL {
|
||||||
std::back_inserter(solutions) );
|
std::back_inserter(solutions) );
|
||||||
if(solutions.size() == 0) return res;
|
if(solutions.size() == 0) return res;
|
||||||
if(solutions.size() == 1) {
|
if(solutions.size() == 1) {
|
||||||
const Solution& sol=*CGAL::internal::intersect_get<Solution>(solutions[0]);
|
const Solution& sol=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
|
||||||
if(SK().has_on_3_object()(a1,sol.first,true) &&
|
if(SK().has_on_3_object()(a1,sol.first,true) &&
|
||||||
SK().has_on_3_object()(a2,sol.first,true))
|
SK().has_on_3_object()(a2,sol.first,true))
|
||||||
*res++ = solutions[0];
|
*res++ = solutions[0];
|
||||||
} else {
|
} else {
|
||||||
const Solution& sol1=*CGAL::internal::intersect_get<Solution>(solutions[0]);
|
const Solution& sol1=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
|
||||||
const Solution& sol2=*CGAL::internal::intersect_get<Solution>(solutions[1]);
|
const Solution& sol2=*CGAL::Intersections::internal::intersect_get<Solution>(solutions[1]);
|
||||||
if(SK().has_on_3_object()(a1,sol1.first,true) &&
|
if(SK().has_on_3_object()(a1,sol1.first,true) &&
|
||||||
SK().has_on_3_object()(a2,sol1.first,true))
|
SK().has_on_3_object()(a2,sol1.first,true))
|
||||||
*res++ = solutions[0];
|
*res++ = solutions[0];
|
||||||
|
|
@ -481,8 +481,8 @@ namespace CGAL {
|
||||||
//one endpoint is extremal: just split the arc
|
//one endpoint is extremal: just split the arc
|
||||||
if (nb_extrem==1){
|
if (nb_extrem==1){
|
||||||
const std::pair<typename SK::Circular_arc_point_3,unsigned>* pt[2]={NULL,NULL};
|
const std::pair<typename SK::Circular_arc_point_3,unsigned>* pt[2]={NULL,NULL};
|
||||||
pt[0]=CGAL::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[0]);
|
pt[0]=CGAL::Intersections::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[0]);
|
||||||
pt[1]=CGAL::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[1]);
|
pt[1]=CGAL::Intersections::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[1]);
|
||||||
CGAL_kernel_precondition(pt[0]!=NULL);
|
CGAL_kernel_precondition(pt[0]!=NULL);
|
||||||
CGAL_kernel_precondition(pt[1]!=NULL);
|
CGAL_kernel_precondition(pt[1]!=NULL);
|
||||||
const typename SK::Circular_arc_point_3& midpt=(arc.source()==pt[0]->first || arc.target()==pt[0]->first)?pt[1]->first:pt[0]->first;
|
const typename SK::Circular_arc_point_3& midpt=(arc.source()==pt[0]->first || arc.target()==pt[0]->first)?pt[1]->first:pt[0]->first;
|
||||||
|
|
@ -496,7 +496,7 @@ namespace CGAL {
|
||||||
//only one intersection points
|
//only one intersection points
|
||||||
if (inters.size()==1){
|
if (inters.size()==1){
|
||||||
const std::pair<typename SK::Circular_arc_point_3,unsigned>* midpt=NULL;
|
const std::pair<typename SK::Circular_arc_point_3,unsigned>* midpt=NULL;
|
||||||
midpt=CGAL::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[0]);
|
midpt=CGAL::Intersections::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[0]);
|
||||||
CGAL_kernel_precondition(midpt!=NULL);
|
CGAL_kernel_precondition(midpt!=NULL);
|
||||||
*out_it++=typename SK::Circular_arc_3(arc.supporting_circle(),arc.source(),midpt->first);
|
*out_it++=typename SK::Circular_arc_3(arc.supporting_circle(),arc.source(),midpt->first);
|
||||||
*out_it++=typename SK::Circular_arc_3(arc.supporting_circle(),midpt->first,arc.target());
|
*out_it++=typename SK::Circular_arc_3(arc.supporting_circle(),midpt->first,arc.target());
|
||||||
|
|
@ -505,8 +505,8 @@ namespace CGAL {
|
||||||
|
|
||||||
//three arcs are defined by two intersection points
|
//three arcs are defined by two intersection points
|
||||||
const std::pair<typename SK::Circular_arc_point_3,unsigned>* pt[2]={NULL,NULL};
|
const std::pair<typename SK::Circular_arc_point_3,unsigned>* pt[2]={NULL,NULL};
|
||||||
pt[0]=CGAL::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[0]);
|
pt[0]=CGAL::Intersections::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[0]);
|
||||||
pt[1]=CGAL::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[1]);
|
pt[1]=CGAL::Intersections::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[1]);
|
||||||
CGAL_kernel_precondition(pt[0]!=NULL);
|
CGAL_kernel_precondition(pt[0]!=NULL);
|
||||||
CGAL_kernel_precondition(pt[1]!=NULL);
|
CGAL_kernel_precondition(pt[1]!=NULL);
|
||||||
|
|
||||||
|
|
@ -590,16 +590,16 @@ namespace CGAL {
|
||||||
CGAL_kernel_precondition(!inters.empty());
|
CGAL_kernel_precondition(!inters.empty());
|
||||||
if (inters.size()==1){
|
if (inters.size()==1){
|
||||||
const typename SK::Circular_arc_point_3& pt=
|
const typename SK::Circular_arc_point_3& pt=
|
||||||
CGAL::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[0])->first;
|
CGAL::Intersections::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[0])->first;
|
||||||
return pt;
|
return pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGAL_kernel_precondition(classify_circle_3<SK>(arc.supporting_circle(),sphere)!=NORMAL);
|
CGAL_kernel_precondition(classify_circle_3<SK>(arc.supporting_circle(),sphere)!=NORMAL);
|
||||||
|
|
||||||
const typename SK::Circular_arc_point_3& pts1 =
|
const typename SK::Circular_arc_point_3& pts1 =
|
||||||
CGAL::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[0])->first;
|
CGAL::Intersections::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[0])->first;
|
||||||
const typename SK::Circular_arc_point_3& pts2 =
|
const typename SK::Circular_arc_point_3& pts2 =
|
||||||
CGAL::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[1])->first;
|
CGAL::Intersections::internal::intersect_get<std::pair<typename SK::Circular_arc_point_3,unsigned> >(inters[1])->first;
|
||||||
|
|
||||||
|
|
||||||
//either a polar (1 pole + 1 pt) or a threaded circle (2 pts with theta-coord = +/- pi)
|
//either a polar (1 pole + 1 pt) or a threaded circle (2 pts with theta-coord = +/- pi)
|
||||||
|
|
|
||||||
|
|
@ -101,12 +101,12 @@ namespace CGAL {
|
||||||
if(!o)
|
if(!o)
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
if(const Point_3* inters_p = CGAL::internal::intersect_get<Point_3>(o)) {
|
if(const Point_3* inters_p = CGAL::Intersections::internal::intersect_get<Point_3>(o)) {
|
||||||
Circular_arc_point_3 p = *inters_p;
|
Circular_arc_point_3 p = *inters_p;
|
||||||
if(!SK().has_on_3_object()(l1,p,true)) return res;
|
if(!SK().has_on_3_object()(l1,p,true)) return res;
|
||||||
if(!SK().has_on_3_object()(l2,p,true)) return res;
|
if(!SK().has_on_3_object()(l2,p,true)) return res;
|
||||||
*res++ = CGAL::internal::sk3_intersection_return<result_type>(std::make_pair(p,1u));
|
*res++ = CGAL::internal::sk3_intersection_return<result_type>(std::make_pair(p,1u));
|
||||||
} else if( CGAL::internal::intersect_get<Line_3>(o) ) {
|
} else if( CGAL::Intersections::internal::intersect_get<Line_3>(o) ) {
|
||||||
if(SK().compare_xyz_3_object()(l1.lower_xyz_extremity(),
|
if(SK().compare_xyz_3_object()(l1.lower_xyz_extremity(),
|
||||||
l2.lower_xyz_extremity()) < 0) {
|
l2.lower_xyz_extremity()) < 0) {
|
||||||
int comparison =
|
int comparison =
|
||||||
|
|
@ -167,9 +167,9 @@ namespace CGAL {
|
||||||
if(!o)
|
if(!o)
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
if(const Line_3* inters_l = CGAL::internal::intersect_get<Line_3>(o)) {
|
if(const Line_3* inters_l = CGAL::Intersections::internal::intersect_get<Line_3>(o)) {
|
||||||
*res++ = CGAL::internal::sk3_intersection_return<result_type>(la);
|
*res++ = CGAL::internal::sk3_intersection_return<result_type>(la);
|
||||||
} else if(const Point_3* inters_p = CGAL::internal::intersect_get<Point_3>(o)) {
|
} else if(const Point_3* inters_p = CGAL::Intersections::internal::intersect_get<Point_3>(o)) {
|
||||||
Circular_arc_point_3 p = *inters_p;
|
Circular_arc_point_3 p = *inters_p;
|
||||||
if(!SK().has_on_3_object()(la,p,true)) return res;
|
if(!SK().has_on_3_object()(la,p,true)) return res;
|
||||||
*res++ = CGAL::internal::sk3_intersection_return<result_type>(std::make_pair(p,1u));
|
*res++ = CGAL::internal::sk3_intersection_return<result_type>(std::make_pair(p,1u));
|
||||||
|
|
@ -195,12 +195,12 @@ namespace CGAL {
|
||||||
std::back_inserter(solutions) );
|
std::back_inserter(solutions) );
|
||||||
if(solutions.size() == 0) return res;
|
if(solutions.size() == 0) return res;
|
||||||
if(solutions.size() == 1) {
|
if(solutions.size() == 1) {
|
||||||
const Solution* sol = CGAL::internal::intersect_get<Solution>(solutions[0]);
|
const Solution* sol = CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
|
||||||
if(SK().has_on_3_object()(l,(*sol).first,true))
|
if(SK().has_on_3_object()(l,(*sol).first,true))
|
||||||
*res++ = solutions[0];
|
*res++ = solutions[0];
|
||||||
} else {
|
} else {
|
||||||
const Solution* sol1 = CGAL::internal::intersect_get<Solution>(solutions[0]);
|
const Solution* sol1 = CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
|
||||||
const Solution* sol2 = CGAL::internal::intersect_get<Solution>(solutions[1]);
|
const Solution* sol2 = CGAL::Intersections::internal::intersect_get<Solution>(solutions[1]);
|
||||||
|
|
||||||
if(SK().has_on_3_object()(l,(*sol1).first,true))
|
if(SK().has_on_3_object()(l,(*sol1).first,true))
|
||||||
*res++ = solutions[0];
|
*res++ = solutions[0];
|
||||||
|
|
@ -226,12 +226,12 @@ namespace CGAL {
|
||||||
std::back_inserter(solutions) );
|
std::back_inserter(solutions) );
|
||||||
if(solutions.size() == 0) return res;
|
if(solutions.size() == 0) return res;
|
||||||
if(solutions.size() == 1) {
|
if(solutions.size() == 1) {
|
||||||
const Solution* sol = CGAL::internal::intersect_get<Solution>(solutions[0]);
|
const Solution* sol = CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
|
||||||
if(SK().has_on_3_object()(l,(*sol).first,true))
|
if(SK().has_on_3_object()(l,(*sol).first,true))
|
||||||
*res++ = solutions[0];
|
*res++ = solutions[0];
|
||||||
} else {
|
} else {
|
||||||
const Solution* sol1 = CGAL::internal::intersect_get<Solution>(solutions[0]);
|
const Solution* sol1 = CGAL::Intersections::internal::intersect_get<Solution>(solutions[0]);
|
||||||
const Solution* sol2 = CGAL::internal::intersect_get<Solution>(solutions[1]);
|
const Solution* sol2 = CGAL::Intersections::internal::intersect_get<Solution>(solutions[1]);
|
||||||
if(SK().has_on_3_object()(l,(*sol1).first,true))
|
if(SK().has_on_3_object()(l,(*sol1).first,true))
|
||||||
*res++ = solutions[0];
|
*res++ = solutions[0];
|
||||||
if(SK().has_on_3_object()(l,(*sol2).first,true))
|
if(SK().has_on_3_object()(l,(*sol2).first,true))
|
||||||
|
|
@ -257,7 +257,7 @@ namespace CGAL {
|
||||||
|
|
||||||
if(!o)
|
if(!o)
|
||||||
return res;
|
return res;
|
||||||
if((sol = CGAL::internal::intersect_get<Point_3>(o))) {
|
if((sol = CGAL::Intersections::internal::intersect_get<Point_3>(o))) {
|
||||||
if(!SK().has_on_3_object()(l,*sol)) return res;
|
if(!SK().has_on_3_object()(l,*sol)) return res;
|
||||||
Circular_arc_point_3 point = sol;
|
Circular_arc_point_3 point = sol;
|
||||||
*res++ = result_type(std::make_pair(point,1u));
|
*res++ = result_type(std::make_pair(point,1u));
|
||||||
|
|
|
||||||
|
|
@ -336,7 +336,7 @@ namespace CGAL {
|
||||||
typename Intersection_traits<SK, Sphere_3, Sphere_3>::result_type v =
|
typename Intersection_traits<SK, Sphere_3, Sphere_3>::result_type v =
|
||||||
SK().intersect_3_object()(s1, s2);
|
SK().intersect_3_object()(s1, s2);
|
||||||
if(!v) return res;
|
if(!v) return res;
|
||||||
if(const Point_3* p = CGAL::internal::intersect_get<Point_3>(v)) {
|
if(const Point_3* p = CGAL::Intersections::internal::intersect_get<Point_3>(v)) {
|
||||||
if(SK().has_on_3_object()(s3, *p)) {
|
if(SK().has_on_3_object()(s3, *p)) {
|
||||||
#if CGAL_INTERSECTION_VERSION < 2
|
#if CGAL_INTERSECTION_VERSION < 2
|
||||||
*res++ = make_object(std::make_pair(Circular_arc_point_3(*p),2u));
|
*res++ = make_object(std::make_pair(Circular_arc_point_3(*p),2u));
|
||||||
|
|
@ -346,7 +346,7 @@ namespace CGAL {
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
if(const Circle_3* c = CGAL::internal::intersect_get<Circle_3>(v)) {
|
if(const Circle_3* c = CGAL::Intersections::internal::intersect_get<Circle_3>(v)) {
|
||||||
if(SK().has_on_3_object()(s3, *c)) {
|
if(SK().has_on_3_object()(s3, *c)) {
|
||||||
#if CGAL_INTERSECTION_VERSION < 2
|
#if CGAL_INTERSECTION_VERSION < 2
|
||||||
*res++ = make_object(*c);
|
*res++ = make_object(*c);
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,14 @@
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
#define CGAL_SPHERICAL_KERNEL_MACRO_GLOBAL_FUNCTION_JUST_INTERSECTION_2_(A,B) \
|
||||||
|
template < class OutputIterator, class K > \
|
||||||
|
OutputIterator \
|
||||||
|
intersection(const A <K> &c1, const B <K> &c2, OutputIterator res) \
|
||||||
|
{ \
|
||||||
|
return typename K::Intersect_3()(c1, c2, res); \
|
||||||
|
}
|
||||||
|
|
||||||
#define CGAL_SPHERICAL_KERNEL_MACRO_GLOBAL_FUNCTION_INTERSECTION_2_(A,B) \
|
#define CGAL_SPHERICAL_KERNEL_MACRO_GLOBAL_FUNCTION_INTERSECTION_2_(A,B) \
|
||||||
template < class OutputIterator, class K > \
|
template < class OutputIterator, class K > \
|
||||||
OutputIterator \
|
OutputIterator \
|
||||||
|
|
@ -68,8 +76,8 @@ do_intersect(const A <K> &c1, const B <K> &c2, const C <K> &c3) \
|
||||||
return typename K::Do_intersect_3()(c1, c2, c3); \
|
return typename K::Do_intersect_3()(c1, c2, c3); \
|
||||||
}
|
}
|
||||||
|
|
||||||
CGAL_SPHERICAL_KERNEL_MACRO_GLOBAL_FUNCTION_INTERSECTION_2_(Sphere_3, Line_3)
|
CGAL_SPHERICAL_KERNEL_MACRO_GLOBAL_FUNCTION_JUST_INTERSECTION_2_(Sphere_3, Line_3)
|
||||||
CGAL_SPHERICAL_KERNEL_MACRO_GLOBAL_FUNCTION_INTERSECTION_2_(Line_3, Sphere_3)
|
CGAL_SPHERICAL_KERNEL_MACRO_GLOBAL_FUNCTION_JUST_INTERSECTION_2_(Line_3, Sphere_3)
|
||||||
CGAL_SPHERICAL_KERNEL_MACRO_GLOBAL_FUNCTION_INTERSECTION_3_(Sphere_3, Sphere_3, Sphere_3)
|
CGAL_SPHERICAL_KERNEL_MACRO_GLOBAL_FUNCTION_INTERSECTION_3_(Sphere_3, Sphere_3, Sphere_3)
|
||||||
CGAL_SPHERICAL_KERNEL_MACRO_GLOBAL_FUNCTION_INTERSECTION_3_(Sphere_3, Sphere_3, Plane_3)
|
CGAL_SPHERICAL_KERNEL_MACRO_GLOBAL_FUNCTION_INTERSECTION_3_(Sphere_3, Sphere_3, Plane_3)
|
||||||
CGAL_SPHERICAL_KERNEL_MACRO_GLOBAL_FUNCTION_INTERSECTION_3_(Plane_3, Sphere_3, Sphere_3)
|
CGAL_SPHERICAL_KERNEL_MACRO_GLOBAL_FUNCTION_INTERSECTION_3_(Plane_3, Sphere_3, Sphere_3)
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#include <CGAL/Segment_2_Segment_2_intersection.h>
|
#include <CGAL/Intersections_2/Segment_2_Segment_2.h>
|
||||||
template <class ForwardIterator, class OutputIterator, class R>
|
template <class ForwardIterator, class OutputIterator, class R>
|
||||||
OutputIterator
|
OutputIterator
|
||||||
si_brute_force(ForwardIterator first, ForwardIterator last,
|
si_brute_force(ForwardIterator first, ForwardIterator last,
|
||||||
|
|
|
||||||
|
|
@ -14,3 +14,4 @@ Number_types
|
||||||
Profiling_tools
|
Profiling_tools
|
||||||
STL_Extension
|
STL_Extension
|
||||||
Stream_support
|
Stream_support
|
||||||
|
Distance_3
|
||||||
|
|
|
||||||
|
|
@ -69,19 +69,19 @@ public:
|
||||||
result_type
|
result_type
|
||||||
operator()(const Segment_2 &s, const Segment_2& t) const
|
operator()(const Segment_2 &s, const Segment_2& t) const
|
||||||
{
|
{
|
||||||
return internal::do_intersect(s,t, SFK());
|
return Intersections::internal::do_intersect(s,t, SFK());
|
||||||
}
|
}
|
||||||
|
|
||||||
result_type
|
result_type
|
||||||
operator()(const Point_2 &p, const Segment_2& t) const
|
operator()(const Point_2 &p, const Segment_2& t) const
|
||||||
{
|
{
|
||||||
return internal::do_intersect(p,t, SFK());
|
return Intersections::internal::do_intersect(p,t, SFK());
|
||||||
}
|
}
|
||||||
|
|
||||||
result_type
|
result_type
|
||||||
operator()(const Segment_2& t, const Point_2 &p) const
|
operator()(const Segment_2& t, const Point_2 &p) const
|
||||||
{
|
{
|
||||||
return internal::do_intersect(p,t, SFK());
|
return Intersections::internal::do_intersect(p,t, SFK());
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
#include <CGAL/internal/Static_filters/Static_filter_error.h>
|
#include <CGAL/internal/Static_filters/Static_filter_error.h>
|
||||||
#include <CGAL/internal/Static_filters/tools.h>
|
#include <CGAL/internal/Static_filters/tools.h>
|
||||||
|
|
||||||
#include <CGAL/internal/Intersections_3/Bbox_3_Segment_3_do_intersect.h>
|
#include <CGAL/Intersections_3/Bbox_3_Segment_3.h>
|
||||||
// for CGAL::internal::do_intersect_bbox_segment_aux
|
// for CGAL::internal::do_intersect_bbox_segment_aux
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
@ -89,13 +89,13 @@ public:
|
||||||
result_type
|
result_type
|
||||||
operator()(const Segment_3 &s, const Triangle_3& t) const
|
operator()(const Segment_3 &s, const Triangle_3& t) const
|
||||||
{
|
{
|
||||||
return internal::do_intersect(t,s, SFK());
|
return Intersections::internal::do_intersect(t,s, SFK());
|
||||||
}
|
}
|
||||||
|
|
||||||
result_type
|
result_type
|
||||||
operator()(const Triangle_3& t, const Segment_3 &s) const
|
operator()(const Triangle_3& t, const Segment_3 &s) const
|
||||||
{
|
{
|
||||||
return internal::do_intersect(t,s, SFK());
|
return Intersections::internal::do_intersect(t,s, SFK());
|
||||||
}
|
}
|
||||||
|
|
||||||
result_type
|
result_type
|
||||||
|
|
@ -124,7 +124,7 @@ public:
|
||||||
CGAL_BRANCH_PROFILER_BRANCH_1(tmp);
|
CGAL_BRANCH_PROFILER_BRANCH_1(tmp);
|
||||||
|
|
||||||
const Uncertain<result_type> ub =
|
const Uncertain<result_type> ub =
|
||||||
do_intersect_bbox_segment_aux
|
Intersections::internal::do_intersect_bbox_segment_aux
|
||||||
<double,
|
<double,
|
||||||
true, // bounded at t=0
|
true, // bounded at t=0
|
||||||
true, // bounded at t=1
|
true, // bounded at t=1
|
||||||
|
|
@ -167,7 +167,7 @@ public:
|
||||||
CGAL_BRANCH_PROFILER_BRANCH_1(tmp);
|
CGAL_BRANCH_PROFILER_BRANCH_1(tmp);
|
||||||
|
|
||||||
const Uncertain<result_type> ub =
|
const Uncertain<result_type> ub =
|
||||||
do_intersect_bbox_segment_aux
|
Intersections::internal::do_intersect_bbox_segment_aux
|
||||||
<double,
|
<double,
|
||||||
true, // bounded at t=0
|
true, // bounded at t=0
|
||||||
false,// not bounded at t=1
|
false,// not bounded at t=1
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,8 @@
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define CGAL_INTERSECTION_FUNCTION(A, B, DIM) \
|
#define CGAL_INTERSECTION_FUNCTION(A, B, DIM) \
|
||||||
template<typename K> \
|
template<typename K> \
|
||||||
inline \
|
inline \
|
||||||
|
|
@ -143,6 +145,8 @@ template<typename B>
|
||||||
class IT<Bbox_3, B> : public Intersection_traits< typename Kernel_traits<B>::Kernel, CGAL::Bbox_3, B >
|
class IT<Bbox_3, B> : public Intersection_traits< typename Kernel_traits<B>::Kernel, CGAL::Bbox_3, B >
|
||||||
{ };
|
{ };
|
||||||
|
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
// this function is used to call either make_object or a
|
// this function is used to call either make_object or a
|
||||||
|
|
@ -246,7 +250,8 @@ do_intersect_impl(const A& a, const B& b, Dynamic_dimension_tag) {
|
||||||
return Kernel().do_intersect_d_object()(a, b);
|
return Kernel().do_intersect_d_object()(a, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // internal
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
// See overloads in the respective header files
|
// See overloads in the respective header files
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
// Copyright (c) 2018 GeometryFactory (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Andreas Fabri
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_2_BBOX_2_CIRCLE_2_H
|
||||||
|
#define CGAL_INTERSECTIONS_2_BBOX_2_CIRCLE_2_H
|
||||||
|
|
||||||
|
#include <CGAL/Bbox_2.h>
|
||||||
|
#include <CGAL/Circle_2.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_2/internal/Bbox_2_Circle_2_do_intersect.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
bool do_intersect(const CGAL::Bbox_2& a,
|
||||||
|
const Circle_2<K>& b) {
|
||||||
|
return K().do_intersect_2_object()(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
bool do_intersect(const Circle_2<K>& a,
|
||||||
|
const CGAL::Bbox_2& b) {
|
||||||
|
return K().do_intersect_2_object()(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif // CGAL_INTERSECTIONS_2_BBOX_2_CIRCLE_2_H
|
||||||
|
|
@ -24,13 +24,11 @@
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Geert-Jan Giezeman
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_BBOX_2_LINE_2_INTERSECTION_H
|
#ifndef CGAL_INTERSECTIONS_2_BBOX_2_LINE_2_H
|
||||||
#define CGAL_BBOX_2_LINE_2_INTERSECTION_H
|
#define CGAL_INTERSECTIONS_2_BBOX_2_LINE_2_H
|
||||||
|
|
||||||
#include <CGAL/Bbox_2.h>
|
#include <CGAL/Bbox_2.h>
|
||||||
#include <CGAL/Line_2.h>
|
#include <CGAL/Line_2.h>
|
||||||
//#include <CGAL/Segment_2.h>
|
|
||||||
//#include <CGAL/Point_2.h>
|
|
||||||
#include <CGAL/kernel_assertions.h>
|
#include <CGAL/kernel_assertions.h>
|
||||||
#include <CGAL/number_utils.h>
|
#include <CGAL/number_utils.h>
|
||||||
|
|
||||||
|
|
@ -98,7 +96,7 @@ inline bool do_intersect(
|
||||||
} //namespace CGAL
|
} //namespace CGAL
|
||||||
|
|
||||||
#ifdef CGAL_HEADER_ONLY
|
#ifdef CGAL_HEADER_ONLY
|
||||||
#include <CGAL/Bbox_2_Line_2_intersection_impl.h>
|
#include <CGAL/Intersections_2/internal/Bbox_2_Line_2_intersection_impl.h>
|
||||||
#endif // CGAL_HEADER_ONLY
|
#endif // CGAL_HEADER_ONLY
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -0,0 +1,97 @@
|
||||||
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_2_BBOX_2_POINT_2_H
|
||||||
|
#define CGAL_INTERSECTIONS_2_BBOX_2_POINT_2_H
|
||||||
|
|
||||||
|
#include <CGAL/Bbox_2.h>
|
||||||
|
#include <CGAL/Point_2.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_2/Iso_rectangle_2_Point_2.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
bool do_intersect(const CGAL::Bbox_2& a,
|
||||||
|
const Point_2<K>& b)
|
||||||
|
{
|
||||||
|
Point_2<K> bl(a.xmin(), a.ymin()), tr(a.xmax(), a.ymax());
|
||||||
|
|
||||||
|
Iso_rectangle_2<K> ic(bl,tr);
|
||||||
|
return K().do_intersect_2_object()(ic, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
bool do_intersect(const Point_2<K>& a,
|
||||||
|
const CGAL::Bbox_2& b)
|
||||||
|
{
|
||||||
|
return do_intersect(b,a);
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
|
namespace internal {
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
typename CGAL::Intersection_traits<K, typename K::Point_2, CGAL::Bbox_2>::result_type
|
||||||
|
intersection(const Point_2<K>& a,
|
||||||
|
const CGAL::Bbox_2& b)
|
||||||
|
{
|
||||||
|
if (do_intersect(a,b))
|
||||||
|
return Intersections::internal::intersection_return<typename K::Intersect_2, typename K::Point_2, CGAL::Bbox_2>(a);
|
||||||
|
return Intersections::internal::intersection_return<typename K::Intersect_2, typename K::Point_2, CGAL::Bbox_2>();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
typename CGAL::Intersection_traits<K, CGAL::Bbox_2, typename K::Point_2>::result_type
|
||||||
|
intersection(const CGAL::Bbox_2& b,
|
||||||
|
const typename K::Point_2 & a,
|
||||||
|
const K& /*k*/ )
|
||||||
|
{
|
||||||
|
if (do_intersect(a,b))
|
||||||
|
return Intersections::internal::intersection_return<typename K::Intersect_2, CGAL::Bbox_2, typename K::Point_2>(a);
|
||||||
|
return Intersections::internal::intersection_return<typename K::Intersect_2, CGAL::Bbox_2, typename K::Point_2>();
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
typename CGAL::Intersection_traits<K, Bbox_2, Point_2<K> >::result_type
|
||||||
|
intersection(const Bbox_2& b,
|
||||||
|
const Point_2<K> & a)
|
||||||
|
{
|
||||||
|
return Intersections::internal::intersection(b,a,K());
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
typename CGAL::Intersection_traits<K, Bbox_2, Point_2<K> >::result_type
|
||||||
|
intersection(const Point_2<K> & a,
|
||||||
|
const Bbox_2& b)
|
||||||
|
{
|
||||||
|
return Intersections::internal::intersection(b,a,K());
|
||||||
|
}
|
||||||
|
} // namespace CGAL
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_2_BBOX_2_POINT_2_H
|
||||||
|
|
@ -24,8 +24,8 @@
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Geert-Jan Giezeman
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_RAY_2_BBOX_2_INTERSECTION_H
|
#ifndef CGAL_INTERSECTIONS_BBOX_2_RAY_2_H
|
||||||
#define CGAL_RAY_2_BBOX_2_INTERSECTION_H
|
#define CGAL_INTERSECTIONS_BBOX_2_RAY_2_H
|
||||||
|
|
||||||
#include <CGAL/Bbox_2.h>
|
#include <CGAL/Bbox_2.h>
|
||||||
#include <CGAL/Ray_2.h>
|
#include <CGAL/Ray_2.h>
|
||||||
|
|
@ -77,7 +77,7 @@ inline bool do_intersect_ray_2(
|
||||||
} //namespace CGAL
|
} //namespace CGAL
|
||||||
|
|
||||||
#ifdef CGAL_HEADER_ONLY
|
#ifdef CGAL_HEADER_ONLY
|
||||||
#include <CGAL/Ray_2_Bbox_2_intersection_impl.h>
|
#include <CGAL/Intersections_2/internal/Ray_2_Bbox_2_intersection_impl.h>
|
||||||
#endif // CGAL_HEADER_ONLY
|
#endif // CGAL_HEADER_ONLY
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -24,14 +24,16 @@
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Geert-Jan Giezeman
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_CIRCLE_2_CIRCLE_2_INTERSECTION_H
|
#ifndef CGAL_INTERSECTIONS_2_CIRCLE_2_CIRCLE_2_H
|
||||||
#define CGAL_CIRCLE_2_CIRCLE_2_INTERSECTION_H
|
#define CGAL_INTERSECTIONS_2_CIRCLE_2_CIRCLE_2_H
|
||||||
|
|
||||||
#include <CGAL/Circle_2.h>
|
#include <CGAL/Circle_2.h>
|
||||||
#include <CGAL/squared_distance_2_1.h>
|
#include <CGAL/squared_distance_2_1.h>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
@ -49,6 +51,7 @@ do_intersect(const typename K::Circle_2 & circ1,
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
inline
|
inline
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
// Copyright (c) 2018 GeometryFactory (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Andreas Fabri
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_2_ISO_RECTANGLE_2_CIRCLE_2_H
|
||||||
|
#define CGAL_INTERSECTIONS_2_ISO_RECTANGLE_2_CIRCLE_2_H
|
||||||
|
|
||||||
|
#include <CGAL/Iso_rectangle_2.h>
|
||||||
|
#include <CGAL/Circle_2.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_2/internal/Bbox_2_Circle_2_do_intersect.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
CGAL_DO_INTERSECT_FUNCTION(Iso_rectangle_2, Circle_2, 2)
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_2_ISO_RECTANGLE_2_CIRCLE_2_H
|
||||||
|
|
@ -24,15 +24,15 @@
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Geert-Jan Giezeman
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_CIRCLE_2_LINE_2_INTERSECTION_H
|
#ifndef CGAL_INTERSECTIONS_2_CIRCLE_2_LINE_2_H
|
||||||
#define CGAL_CIRCLE_2_LINE_2_INTERSECTION_H
|
#define CGAL_INTERSECTIONS_2_CIRCLE_2_LINE_2_H
|
||||||
|
|
||||||
#include <CGAL/Circle_2.h>
|
#include <CGAL/Circle_2.h>
|
||||||
#include <CGAL/Line_2.h>
|
#include <CGAL/Line_2.h>
|
||||||
#include <CGAL/squared_distance_2_1.h>
|
#include <CGAL/squared_distance_2_1.h>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
namespace Intersections {
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
@ -54,6 +54,7 @@ do_intersect(const typename K::Line_2& l,
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
inline
|
inline
|
||||||
|
|
@ -0,0 +1,86 @@
|
||||||
|
// Copyright (c) 2018 INRIA Sophia-Antipolis (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Maxime Gimeno
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_2_POINT_2_CIRCLE_2_H
|
||||||
|
#define CGAL_INTERSECTIONS_2_POINT_2_CIRCLE_2_H
|
||||||
|
|
||||||
|
#include <CGAL/Circle_2.h>
|
||||||
|
#include <CGAL/Point_2.h>
|
||||||
|
#include <CGAL/Intersection_traits_2.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
|
namespace internal {
|
||||||
|
|
||||||
|
template <class K>
|
||||||
|
inline
|
||||||
|
bool
|
||||||
|
do_intersect(const typename K::Point_2 &pt,
|
||||||
|
const typename K::Circle_2 &circle,
|
||||||
|
const K&)
|
||||||
|
{
|
||||||
|
return circle.has_on_boundary(pt);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template <class K>
|
||||||
|
inline
|
||||||
|
bool
|
||||||
|
do_intersect(const typename K::Circle_2 &circle,
|
||||||
|
const typename K::Point_2 &pt,
|
||||||
|
const K&)
|
||||||
|
{
|
||||||
|
return circle.has_on_boundary(pt);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template <class K>
|
||||||
|
typename CGAL::Intersection_traits
|
||||||
|
<K, typename K::Point_2, typename K::Circle_2>::result_type
|
||||||
|
intersection(const typename K::Point_2 &pt,
|
||||||
|
const typename K::Circle_2 &circle,
|
||||||
|
const K& k)
|
||||||
|
{
|
||||||
|
if (do_intersect(pt,circle, k))
|
||||||
|
return intersection_return<typename K::Intersect_2, typename K::Point_2, typename K::Circle_2>(pt);
|
||||||
|
return intersection_return<typename K::Intersect_2, typename K::Point_2, typename K::Circle_2>();
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class K>
|
||||||
|
typename CGAL::Intersection_traits
|
||||||
|
<K, typename K::Circle_2, typename K::Point_2>::result_type
|
||||||
|
intersection(const typename K::Circle_2 &circle,
|
||||||
|
const typename K::Point_2 &pt,
|
||||||
|
const K& k)
|
||||||
|
{
|
||||||
|
return internal::intersection(pt, circle, k);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
|
CGAL_INTERSECTION_FUNCTION(Point_2, Circle_2, 2)
|
||||||
|
CGAL_DO_INTERSECT_FUNCTION(Circle_2, Point_2, 2)
|
||||||
|
|
||||||
|
} //namespace CGAL
|
||||||
|
#endif // CGAL_INTERSECTIONS_2_POINT_2_CIRCLE_2_H
|
||||||
|
|
@ -24,14 +24,16 @@
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Geert-Jan Giezeman
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_ISO_RECTANGLE_2_ISO_RECTANGLE_2_INTERSECTION_H
|
#ifndef CGAL_INTERSECTIONS_2_ISO_RECTANGLE_2_ISO_RECTANGLE_2_H
|
||||||
#define CGAL_ISO_RECTANGLE_2_ISO_RECTANGLE_2_INTERSECTION_H
|
#define CGAL_INTERSECTIONS_2_ISO_RECTANGLE_2_ISO_RECTANGLE_2_H
|
||||||
|
|
||||||
#include <CGAL/Iso_rectangle_2.h>
|
#include <CGAL/Iso_rectangle_2.h>
|
||||||
#include <CGAL/Intersection_traits_2.h>
|
#include <CGAL/Intersection_traits_2.h>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
@ -89,6 +91,7 @@ do_intersect(const typename K::Iso_rectangle_2 &irect1,
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
|
|
||||||
CGAL_INTERSECTION_FUNCTION_SELF(Iso_rectangle_2, 2)
|
CGAL_INTERSECTION_FUNCTION_SELF(Iso_rectangle_2, 2)
|
||||||
|
|
@ -24,14 +24,13 @@
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Geert-Jan Giezeman
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_LINE_2_ISO_RECTANGLE_2_INTERSECTION_H
|
#ifndef CGAL_INTERSECTIONS_2_ISO_RECTANGLE_2_LINE_2_H
|
||||||
#define CGAL_LINE_2_ISO_RECTANGLE_2_INTERSECTION_H
|
#define CGAL_INTERSECTIONS_2_ISO_RECTANGLE_2_LINE_2_H
|
||||||
|
|
||||||
#include <CGAL/disable_warnings.h>
|
#include <CGAL/disable_warnings.h>
|
||||||
|
|
||||||
#include <CGAL/Line_2.h>
|
#include <CGAL/Line_2.h>
|
||||||
#include <CGAL/Iso_rectangle_2.h>
|
#include <CGAL/Iso_rectangle_2.h>
|
||||||
#include <CGAL/Line_2.h>
|
|
||||||
#include <CGAL/kernel_assertions.h>
|
#include <CGAL/kernel_assertions.h>
|
||||||
#include <CGAL/number_utils.h>
|
#include <CGAL/number_utils.h>
|
||||||
#include <CGAL/Intersection_traits_2.h>
|
#include <CGAL/Intersection_traits_2.h>
|
||||||
|
|
@ -39,6 +38,8 @@
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
@ -219,6 +220,7 @@ intersection(const typename K::Iso_rectangle_2 &iso,
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
CGAL_INTERSECTION_FUNCTION(Line_2, Iso_rectangle_2, 2)
|
CGAL_INTERSECTION_FUNCTION(Line_2, Iso_rectangle_2, 2)
|
||||||
CGAL_DO_INTERSECT_FUNCTION(Line_2, Iso_rectangle_2, 2)
|
CGAL_DO_INTERSECT_FUNCTION(Line_2, Iso_rectangle_2, 2)
|
||||||
|
|
@ -24,8 +24,8 @@
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Geert-Jan Giezeman
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_POINT_2_ISO_RECTANGLE_2_INTERSECTION_H
|
#ifndef CGAL_INTERSECTIONS_2_POINT_2_ISO_RECTANGLE_2_H
|
||||||
#define CGAL_POINT_2_ISO_RECTANGLE_2_INTERSECTION_H
|
#define CGAL_INTERSECTIONS_2_POINT_2_ISO_RECTANGLE_2_H
|
||||||
|
|
||||||
#include <CGAL/Iso_rectangle_2.h>
|
#include <CGAL/Iso_rectangle_2.h>
|
||||||
#include <CGAL/Point_2.h>
|
#include <CGAL/Point_2.h>
|
||||||
|
|
@ -33,6 +33,8 @@
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
@ -79,6 +81,7 @@ intersection(const typename K::Iso_rectangle_2 &iso,
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
CGAL_INTERSECTION_FUNCTION(Point_2, Iso_rectangle_2, 2)
|
CGAL_INTERSECTION_FUNCTION(Point_2, Iso_rectangle_2, 2)
|
||||||
CGAL_DO_INTERSECT_FUNCTION(Point_2, Iso_rectangle_2, 2)
|
CGAL_DO_INTERSECT_FUNCTION(Point_2, Iso_rectangle_2, 2)
|
||||||
|
|
@ -24,21 +24,21 @@
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Geert-Jan Giezeman
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_RAY_2_ISO_RECTANGLE_2_INTERSECTION_H
|
#ifndef CGAL_INTERSECTIONS_2_ISO_RECTANGLE_2_RAY_2_H
|
||||||
#define CGAL_RAY_2_ISO_RECTANGLE_2_INTERSECTION_H
|
#define CGAL_INTERSECTIONS_2_ISO_RECTANGLE_2_RAY_2_H
|
||||||
|
|
||||||
#include <CGAL/disable_warnings.h>
|
#include <CGAL/disable_warnings.h>
|
||||||
|
|
||||||
#include <CGAL/Iso_rectangle_2.h>
|
#include <CGAL/Iso_rectangle_2.h>
|
||||||
#include <CGAL/Ray_2.h>
|
#include <CGAL/Ray_2.h>
|
||||||
#include <CGAL/Segment_2.h>
|
|
||||||
#include <CGAL/Point_2.h>
|
|
||||||
#include <CGAL/kernel_assertions.h>
|
#include <CGAL/kernel_assertions.h>
|
||||||
#include <CGAL/number_utils.h>
|
#include <CGAL/number_utils.h>
|
||||||
#include <CGAL/Intersection_traits_2.h>
|
#include <CGAL/Intersection_traits_2.h>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
@ -206,6 +206,7 @@ Ray_2_Iso_rectangle_2_pair<K>::intersection_point() const
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
CGAL_INTERSECTION_FUNCTION(Ray_2, Iso_rectangle_2, 2)
|
CGAL_INTERSECTION_FUNCTION(Ray_2, Iso_rectangle_2, 2)
|
||||||
CGAL_DO_INTERSECT_FUNCTION(Ray_2, Iso_rectangle_2, 2)
|
CGAL_DO_INTERSECT_FUNCTION(Ray_2, Iso_rectangle_2, 2)
|
||||||
|
|
@ -24,20 +24,22 @@
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Geert-Jan Giezeman
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_SEGMENT_2_ISO_RECTANGLE_2_INTERSECTION_H
|
#ifndef CGAL_INTERSECTIONS_2_ISO_RECTANGLE_2_SEGMENT_2_H
|
||||||
#define CGAL_SEGMENT_2_ISO_RECTANGLE_2_INTERSECTION_H
|
#define CGAL_INTERSECTIONS_2_ISO_RECTANGLE_2_SEGMENT_2_H
|
||||||
|
|
||||||
#include <CGAL/disable_warnings.h>
|
#include <CGAL/disable_warnings.h>
|
||||||
|
|
||||||
#include <CGAL/Iso_rectangle_2.h>
|
#include <CGAL/Iso_rectangle_2.h>
|
||||||
#include <CGAL/Segment_2.h>
|
#include <CGAL/Segment_2.h>
|
||||||
#include <CGAL/Point_2.h>
|
|
||||||
#include <CGAL/kernel_assertions.h>
|
#include <CGAL/kernel_assertions.h>
|
||||||
#include <CGAL/number_utils.h>
|
#include <CGAL/number_utils.h>
|
||||||
#include <CGAL/Intersection_traits_2.h>
|
#include <CGAL/Intersection_traits_2.h>
|
||||||
|
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
@ -232,6 +234,7 @@ inline bool do_intersect(
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
CGAL_INTERSECTION_FUNCTION(Segment_2, Iso_rectangle_2, 2)
|
CGAL_INTERSECTION_FUNCTION(Segment_2, Iso_rectangle_2, 2)
|
||||||
CGAL_DO_INTERSECT_FUNCTION(Segment_2, Iso_rectangle_2, 2)
|
CGAL_DO_INTERSECT_FUNCTION(Segment_2, Iso_rectangle_2, 2)
|
||||||
|
|
@ -19,22 +19,24 @@
|
||||||
//
|
//
|
||||||
// Author(s) : Radu Ursu
|
// Author(s) : Radu Ursu
|
||||||
|
|
||||||
#ifndef CGAL_TRIANGLE_2_ISO_RECTANGLE_2_INTERSECTION_H
|
#ifndef CGAL_INTERSECTIONS_2_ISO_RECTANGLE_2_TRIANGLE_2_H
|
||||||
#define CGAL_TRIANGLE_2_ISO_RECTANGLE_2_INTERSECTION_H
|
#define CGAL_INTERSECTIONS_2_ISO_RECTANGLE_2_TRIANGLE_2_H
|
||||||
|
|
||||||
#include <CGAL/Point_2.h>
|
|
||||||
#include <CGAL/Segment_2.h>
|
|
||||||
#include <CGAL/Triangle_2.h>
|
#include <CGAL/Triangle_2.h>
|
||||||
#include <CGAL/Iso_rectangle_2.h>
|
#include <CGAL/Iso_rectangle_2.h>
|
||||||
#include <CGAL/Segment_2_Segment_2_intersection.h>
|
#include <CGAL/Intersections_2/Segment_2_Segment_2.h>
|
||||||
#include <CGAL/Intersection_traits_2.h>
|
#include <CGAL/Intersection_traits_2.h>
|
||||||
#include <CGAL/Segment_2_Iso_rectangle_2_intersection.h>
|
#include <CGAL/Intersections_2/Iso_rectangle_2_Segment_2.h>
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
|
|
||||||
namespace CGAL{ namespace internal {
|
namespace CGAL{
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
|
namespace internal {
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
typename Intersection_traits<K, typename K::Triangle_2, typename K::Iso_rectangle_2>::result_type
|
typename Intersection_traits<K, typename K::Triangle_2, typename K::Iso_rectangle_2>::result_type
|
||||||
|
|
@ -331,6 +333,7 @@ namespace CGAL{ namespace internal {
|
||||||
}
|
}
|
||||||
|
|
||||||
} //namespace internal
|
} //namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
CGAL_INTERSECTION_FUNCTION(Triangle_2, Iso_rectangle_2, 2)
|
CGAL_INTERSECTION_FUNCTION(Triangle_2, Iso_rectangle_2, 2)
|
||||||
CGAL_DO_INTERSECT_FUNCTION(Triangle_2, Iso_rectangle_2, 2)
|
CGAL_DO_INTERSECT_FUNCTION(Triangle_2, Iso_rectangle_2, 2)
|
||||||
|
|
@ -24,18 +24,22 @@
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Geert-Jan Giezeman
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_LINE_2_LINE_2_INTERSECTION_H
|
#ifndef CGAL_INTERSECTIONS_2_LINE_2_LINE_2_H
|
||||||
#define CGAL_LINE_2_LINE_2_INTERSECTION_H
|
#define CGAL_INTERSECTIONS_2_LINE_2_LINE_2_H
|
||||||
|
|
||||||
#include <CGAL/config.h>
|
#include <CGAL/config.h>
|
||||||
#include <CGAL/Line_2.h>
|
#include <CGAL/Line_2.h>
|
||||||
#include <CGAL/Point_2.h>
|
|
||||||
#include <CGAL/kernel_assertions.h>
|
#include <CGAL/kernel_assertions.h>
|
||||||
#include <CGAL/number_utils.h>
|
#include <CGAL/number_utils.h>
|
||||||
#include <CGAL/Intersection_traits_2.h>
|
#include <CGAL/Intersection_traits_2.h>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
class Cartesian_tag;
|
||||||
|
class Homogeneous_tag;
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
@ -202,6 +206,7 @@ Line_2_Line_2_pair<K>::intersection_line() const
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
CGAL_INTERSECTION_FUNCTION_SELF(Line_2, 2)
|
CGAL_INTERSECTION_FUNCTION_SELF(Line_2, 2)
|
||||||
CGAL_DO_INTERSECT_FUNCTION_SELF(Line_2, 2)
|
CGAL_DO_INTERSECT_FUNCTION_SELF(Line_2, 2)
|
||||||
|
|
@ -24,8 +24,8 @@
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Geert-Jan Giezeman
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_POINT_2_LINE_2_INTERSECTION_H
|
#ifndef CGAL_INTERSECTIONS_2_POINT_2_LINE_2_H
|
||||||
#define CGAL_POINT_2_LINE_2_INTERSECTION_H
|
#define CGAL_INTERSECTIONS_2_POINT_2_LINE_2_H
|
||||||
|
|
||||||
#include <CGAL/Line_2.h>
|
#include <CGAL/Line_2.h>
|
||||||
#include <CGAL/Point_2.h>
|
#include <CGAL/Point_2.h>
|
||||||
|
|
@ -33,6 +33,8 @@
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
@ -77,6 +79,8 @@ intersection(const typename K::Line_2 &line,
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
|
|
||||||
CGAL_INTERSECTION_FUNCTION(Point_2, Line_2, 2)
|
CGAL_INTERSECTION_FUNCTION(Point_2, Line_2, 2)
|
||||||
CGAL_DO_INTERSECT_FUNCTION(Point_2, Line_2, 2)
|
CGAL_DO_INTERSECT_FUNCTION(Point_2, Line_2, 2)
|
||||||
|
|
@ -24,19 +24,21 @@
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Geert-Jan Giezeman
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_RAY_2_LINE_2_INTERSECTION_H
|
#ifndef CGAL_INTERSECTIONS_2_LINE_2_RAY_2_H
|
||||||
#define CGAL_RAY_2_LINE_2_INTERSECTION_H
|
#define CGAL_INTERSECTIONS_2_LINE_2_RAY_2_H
|
||||||
|
|
||||||
#include <CGAL/Line_2.h>
|
#include <CGAL/Line_2.h>
|
||||||
#include <CGAL/Ray_2.h>
|
#include <CGAL/Ray_2.h>
|
||||||
#include <CGAL/Point_2.h>
|
#include <CGAL/Point_2.h>
|
||||||
#include <CGAL/kernel_assertions.h>
|
#include <CGAL/kernel_assertions.h>
|
||||||
#include <CGAL/number_utils.h>
|
#include <CGAL/number_utils.h>
|
||||||
#include <CGAL/Line_2_Line_2_intersection.h>
|
#include <CGAL/Intersections_2/Line_2_Line_2.h>
|
||||||
#include <CGAL/Intersection_traits_2.h>
|
#include <CGAL/Intersection_traits_2.h>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
@ -166,6 +168,7 @@ Ray_2_Line_2_pair<K>::intersection_ray() const
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
CGAL_INTERSECTION_FUNCTION(Ray_2, Line_2, 2)
|
CGAL_INTERSECTION_FUNCTION(Ray_2, Line_2, 2)
|
||||||
CGAL_DO_INTERSECT_FUNCTION(Ray_2, Line_2, 2)
|
CGAL_DO_INTERSECT_FUNCTION(Ray_2, Line_2, 2)
|
||||||
|
|
@ -24,19 +24,20 @@
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Geert-Jan Giezeman
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_SEGMENT_2_LINE_2_INTERSECTION_H
|
#ifndef CGAL_INTERSECTIONS_2_SEGMENT_2_LINE_2_H
|
||||||
#define CGAL_SEGMENT_2_LINE_2_INTERSECTION_H
|
#define CGAL_INTERSECTIONS_2_SEGMENT_2_LINE_2_H
|
||||||
|
|
||||||
#include <CGAL/Line_2.h>
|
#include <CGAL/Line_2.h>
|
||||||
#include <CGAL/Segment_2.h>
|
#include <CGAL/Segment_2.h>
|
||||||
#include <CGAL/Point_2.h>
|
|
||||||
#include <CGAL/kernel_assertions.h>
|
#include <CGAL/kernel_assertions.h>
|
||||||
#include <CGAL/number_utils.h>
|
#include <CGAL/number_utils.h>
|
||||||
#include <CGAL/Line_2_Line_2_intersection.h>
|
#include <CGAL/Intersections_2/Line_2_Line_2.h>
|
||||||
#include <CGAL/Intersection_traits_2.h>
|
#include <CGAL/Intersection_traits_2.h>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
@ -159,6 +160,7 @@ Segment_2_Line_2_pair<K>::intersection_segment() const
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
CGAL_INTERSECTION_FUNCTION(Segment_2, Line_2, 2)
|
CGAL_INTERSECTION_FUNCTION(Segment_2, Line_2, 2)
|
||||||
CGAL_DO_INTERSECT_FUNCTION(Segment_2, Line_2, 2)
|
CGAL_DO_INTERSECT_FUNCTION(Segment_2, Line_2, 2)
|
||||||
|
|
@ -24,20 +24,22 @@
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Geert-Jan Giezeman
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_LINE_2_TRIANGLE_2_INTERSECTION_H
|
#ifndef CGAL_INTERSECTIONS_2_LINE_2_TRIANGLE_2_H
|
||||||
#define CGAL_LINE_2_TRIANGLE_2_INTERSECTION_H
|
#define CGAL_INTERSECTIONS_2_LINE_2_TRIANGLE_2_H
|
||||||
|
|
||||||
#include <CGAL/Line_2.h>
|
#include <CGAL/Line_2.h>
|
||||||
#include <CGAL/Segment_2.h>
|
#include <CGAL/Segment_2.h>
|
||||||
#include <CGAL/Triangle_2.h>
|
#include <CGAL/Triangle_2.h>
|
||||||
#include <CGAL/Point_2.h>
|
#include <CGAL/Point_2.h>
|
||||||
#include <CGAL/Straight_2.h>
|
#include <CGAL/Intersections_2/internal/Straight_2.h>
|
||||||
#include <CGAL/kernel_assertions.h>
|
#include <CGAL/kernel_assertions.h>
|
||||||
#include <CGAL/number_utils.h>
|
#include <CGAL/number_utils.h>
|
||||||
#include <CGAL/Intersection_traits_2.h>
|
#include <CGAL/Intersection_traits_2.h>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
@ -194,6 +196,7 @@ intersection(const typename K::Triangle_2 &tr,
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
CGAL_INTERSECTION_FUNCTION(Line_2, Triangle_2, 2)
|
CGAL_INTERSECTION_FUNCTION(Line_2, Triangle_2, 2)
|
||||||
CGAL_DO_INTERSECT_FUNCTION(Line_2, Triangle_2, 2)
|
CGAL_DO_INTERSECT_FUNCTION(Line_2, Triangle_2, 2)
|
||||||
|
|
@ -24,14 +24,16 @@
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Geert-Jan Giezeman
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_POINT_2_POINT_2_INTERSECTION_H
|
#ifndef CGAL_INTERSECTIONS_2_POINT_2_POINT_2_H
|
||||||
#define CGAL_POINT_2_POINT_2_INTERSECTION_H
|
#define CGAL_INTERSECTIONS_2_POINT_2_POINT_2_H
|
||||||
|
|
||||||
#include <CGAL/Point_2.h>
|
#include <CGAL/Point_2.h>
|
||||||
#include <CGAL/Intersection_traits_2.h>
|
#include <CGAL/Intersection_traits_2.h>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
@ -55,6 +57,7 @@ intersection(const typename K::Point_2 &pt1,
|
||||||
}
|
}
|
||||||
|
|
||||||
}// namespace internal
|
}// namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
CGAL_INTERSECTION_FUNCTION_SELF(Point_2, 2)
|
CGAL_INTERSECTION_FUNCTION_SELF(Point_2, 2)
|
||||||
CGAL_DO_INTERSECT_FUNCTION_SELF(Point_2, 2)
|
CGAL_DO_INTERSECT_FUNCTION_SELF(Point_2, 2)
|
||||||
|
|
@ -24,8 +24,8 @@
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Geert-Jan Giezeman
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_POINT_2_RAY_2_INTERSECTION_H
|
#ifndef CGAL_INTERSECTIONS_2_POINT_2_RAY_2_H
|
||||||
#define CGAL_POINT_2_RAY_2_INTERSECTION_H
|
#define CGAL_INTERSECTIONS_2_POINT_2_RAY_2_H
|
||||||
|
|
||||||
#include <CGAL/Ray_2.h>
|
#include <CGAL/Ray_2.h>
|
||||||
#include <CGAL/Point_2.h>
|
#include <CGAL/Point_2.h>
|
||||||
|
|
@ -33,6 +33,8 @@
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
@ -81,6 +83,7 @@ intersection(const typename K::Ray_2 &ray,
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
CGAL_INTERSECTION_FUNCTION(Point_2, Ray_2, 2)
|
CGAL_INTERSECTION_FUNCTION(Point_2, Ray_2, 2)
|
||||||
CGAL_DO_INTERSECT_FUNCTION(Point_2, Ray_2, 2)
|
CGAL_DO_INTERSECT_FUNCTION(Point_2, Ray_2, 2)
|
||||||
|
|
@ -24,8 +24,8 @@
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Geert-Jan Giezeman
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_POINT_2_SEGMENT_2_INTERSECTION_H
|
#ifndef CGAL_INTERSECTIONS_2_POINT_2_SEGMENT_2_H
|
||||||
#define CGAL_POINT_2_SEGMENT_2_INTERSECTION_H
|
#define CGAL_INTERSECTIONS_2_POINT_2_SEGMENT_2_H
|
||||||
|
|
||||||
#include <CGAL/Segment_2.h>
|
#include <CGAL/Segment_2.h>
|
||||||
#include <CGAL/Point_2.h>
|
#include <CGAL/Point_2.h>
|
||||||
|
|
@ -33,6 +33,8 @@
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
@ -82,6 +84,8 @@ intersection( const typename K::Segment_2 &seg,
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
|
|
||||||
CGAL_INTERSECTION_FUNCTION(Point_2, Segment_2, 2)
|
CGAL_INTERSECTION_FUNCTION(Point_2, Segment_2, 2)
|
||||||
CGAL_DO_INTERSECT_FUNCTION(Point_2, Segment_2, 2)
|
CGAL_DO_INTERSECT_FUNCTION(Point_2, Segment_2, 2)
|
||||||
|
|
@ -24,18 +24,19 @@
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Geert-Jan Giezeman
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_POINT_2_TRIANGLE_2_INTERSECTION_H
|
#ifndef CGAL_INTERSECTIONS_2_POINT_2_TRIANGLE_2_H
|
||||||
#define CGAL_POINT_2_TRIANGLE_2_INTERSECTION_H
|
#define CGAL_INTERSECTIONS_2_POINT_2_TRIANGLE_2_H
|
||||||
|
|
||||||
#include <CGAL/Point_2.h>
|
#include <CGAL/Point_2.h>
|
||||||
#include <CGAL/Triangle_2.h>
|
#include <CGAL/Triangle_2.h>
|
||||||
#include <CGAL/Line_2.h>
|
|
||||||
#include <CGAL/kernel_assertions.h>
|
#include <CGAL/kernel_assertions.h>
|
||||||
#include <CGAL/number_utils.h>
|
#include <CGAL/number_utils.h>
|
||||||
#include <CGAL/Straight_2.h>
|
#include <CGAL/Intersections_2/internal/Straight_2.h>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
@ -91,26 +92,6 @@ Point_2_Triangle_2_pair<K>::intersection_type() const
|
||||||
_result = POINT;
|
_result = POINT;
|
||||||
}
|
}
|
||||||
return _result;
|
return _result;
|
||||||
/*
|
|
||||||
typedef typename K::Line_2 line_t;
|
|
||||||
line_t l(_trian->vertex(0), _trian->vertex(1));
|
|
||||||
if (l.has_on_positive_side(_trian->vertex(2))) {
|
|
||||||
for (int i=0; i<3; i++) {
|
|
||||||
if (line_t(_trian->vertex(i), _trian->vertex(i+1)).
|
|
||||||
has_on_negative_side(*_pt)) {
|
|
||||||
_result = NO_INTERSECTION;
|
|
||||||
return _result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (int i=0; i<3; i++)
|
|
||||||
if(line_t(_trian->vertex(i), _trian->vertex(i-1)).
|
|
||||||
has_on_negative_side(*_pt)){
|
|
||||||
_result = NO_INTERSECTION;
|
|
||||||
return _result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -158,6 +139,7 @@ intersection(const typename K::Triangle_2 &tr,
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
CGAL_INTERSECTION_FUNCTION(Point_2, Triangle_2, 2)
|
CGAL_INTERSECTION_FUNCTION(Point_2, Triangle_2, 2)
|
||||||
CGAL_DO_INTERSECT_FUNCTION(Point_2, Triangle_2, 2)
|
CGAL_DO_INTERSECT_FUNCTION(Point_2, Triangle_2, 2)
|
||||||
|
|
@ -24,21 +24,22 @@
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Geert-Jan Giezeman
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_RAY_2_RAY_2_INTERSECTION_H
|
#ifndef CGAL_INTERSECTIONS_2_RAY_2_RAY_2_H
|
||||||
#define CGAL_RAY_2_RAY_2_INTERSECTION_H
|
#define CGAL_INTERSECTIONS_2_RAY_2_RAY_2_H
|
||||||
|
|
||||||
#include <CGAL/Ray_2.h>
|
#include <CGAL/Ray_2.h>
|
||||||
#include <CGAL/Segment_2.h>
|
#include <CGAL/Segment_2.h>
|
||||||
#include <CGAL/Point_2.h>
|
#include <CGAL/Point_2.h>
|
||||||
#include <CGAL/kernel_assertions.h>
|
#include <CGAL/kernel_assertions.h>
|
||||||
#include <CGAL/number_utils.h>
|
#include <CGAL/number_utils.h>
|
||||||
#include <CGAL/Line_2.h>
|
#include <CGAL/Intersections_2/Line_2_Line_2.h>
|
||||||
#include <CGAL/Line_2_Line_2_intersection.h>
|
|
||||||
#include <CGAL/Intersection_traits_2.h>
|
#include <CGAL/Intersection_traits_2.h>
|
||||||
|
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
@ -257,6 +258,7 @@ intersection(const typename K::Ray_2 &ray1,
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
CGAL_INTERSECTION_FUNCTION_SELF(Ray_2, 2)
|
CGAL_INTERSECTION_FUNCTION_SELF(Ray_2, 2)
|
||||||
CGAL_DO_INTERSECT_FUNCTION_SELF(Ray_2, 2)
|
CGAL_DO_INTERSECT_FUNCTION_SELF(Ray_2, 2)
|
||||||
|
|
@ -24,21 +24,23 @@
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Geert-Jan Giezeman
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_RAY_2_SEGMENT_2_INTERSECTION_H
|
#ifndef CGAL_INTERSECTIONS_2_RAY_2_SEGMENT_2_H
|
||||||
#define CGAL_RAY_2_SEGMENT_2_INTERSECTION_H
|
#define CGAL_INTERSECTIONS_2_RAY_2_SEGMENT_2_H
|
||||||
|
|
||||||
#include <CGAL/Ray_2.h>
|
#include <CGAL/Ray_2.h>
|
||||||
#include <CGAL/Segment_2.h>
|
#include <CGAL/Segment_2.h>
|
||||||
#include <CGAL/Point_2.h>
|
#include <CGAL/Point_2.h>
|
||||||
|
#include <CGAL/Line_2.h>
|
||||||
#include <CGAL/kernel_assertions.h>
|
#include <CGAL/kernel_assertions.h>
|
||||||
#include <CGAL/number_utils.h>
|
#include <CGAL/number_utils.h>
|
||||||
#include <CGAL/Line_2.h>
|
#include <CGAL/Intersections_2/Line_2_Line_2.h>
|
||||||
#include <CGAL/Line_2_Line_2_intersection.h>
|
|
||||||
#include <CGAL/Intersection_traits_2.h>
|
#include <CGAL/Intersection_traits_2.h>
|
||||||
|
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
@ -269,6 +271,7 @@ intersection(const typename K::Segment_2 &seg,
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
CGAL_INTERSECTION_FUNCTION(Ray_2, Segment_2, 2)
|
CGAL_INTERSECTION_FUNCTION(Ray_2, Segment_2, 2)
|
||||||
CGAL_DO_INTERSECT_FUNCTION(Ray_2, Segment_2, 2)
|
CGAL_DO_INTERSECT_FUNCTION(Ray_2, Segment_2, 2)
|
||||||
|
|
@ -24,21 +24,20 @@
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Geert-Jan Giezeman
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_RAY_2_TRIANGLE_2_INTERSECTION_H
|
#ifndef CGAL_INTERSECTIONS_2_RAY_2_TRIANGLE_2_H
|
||||||
#define CGAL_RAY_2_TRIANGLE_2_INTERSECTION_H
|
#define CGAL_INTERSECTIONS_2_RAY_2_TRIANGLE_2_H
|
||||||
|
|
||||||
#include <CGAL/Segment_2.h>
|
|
||||||
#include <CGAL/Ray_2.h>
|
#include <CGAL/Ray_2.h>
|
||||||
#include <CGAL/Triangle_2.h>
|
#include <CGAL/Triangle_2.h>
|
||||||
#include <CGAL/Point_2.h>
|
|
||||||
#include <CGAL/Line_2.h>
|
|
||||||
#include <CGAL/kernel_assertions.h>
|
#include <CGAL/kernel_assertions.h>
|
||||||
#include <CGAL/number_utils.h>
|
#include <CGAL/number_utils.h>
|
||||||
#include <CGAL/Straight_2.h>
|
#include <CGAL/Intersections_2/internal/Straight_2.h>
|
||||||
#include <CGAL/Intersection_traits_2.h>
|
#include <CGAL/Intersection_traits_2.h>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
@ -200,6 +199,7 @@ inline bool do_intersect(
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
CGAL_INTERSECTION_FUNCTION(Ray_2, Triangle_2, 2)
|
CGAL_INTERSECTION_FUNCTION(Ray_2, Triangle_2, 2)
|
||||||
CGAL_DO_INTERSECT_FUNCTION(Ray_2, Triangle_2, 2)
|
CGAL_DO_INTERSECT_FUNCTION(Ray_2, Triangle_2, 2)
|
||||||
|
|
@ -24,8 +24,8 @@
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Geert-Jan Giezeman
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_SEGMENT_2_SEGMENT_2_INTERSECTION_H
|
#ifndef CGAL_INTERSECTIONS_2_SEGMENT_2_SEGMENT_2_H
|
||||||
#define CGAL_SEGMENT_2_SEGMENT_2_INTERSECTION_H
|
#define CGAL_INTERSECTIONS_2_SEGMENT_2_SEGMENT_2_H
|
||||||
|
|
||||||
#include <CGAL/Segment_2.h>
|
#include <CGAL/Segment_2.h>
|
||||||
#include <CGAL/Point_2.h>
|
#include <CGAL/Point_2.h>
|
||||||
|
|
@ -33,12 +33,14 @@
|
||||||
#include <CGAL/number_utils.h>
|
#include <CGAL/number_utils.h>
|
||||||
#include <CGAL/predicates_on_points_2.h>
|
#include <CGAL/predicates_on_points_2.h>
|
||||||
#include <CGAL/Line_2.h>
|
#include <CGAL/Line_2.h>
|
||||||
#include <CGAL/Line_2_Line_2_intersection.h>
|
#include <CGAL/Intersections_2/Line_2_Line_2.h>
|
||||||
#include <CGAL/Uncertain.h>
|
#include <CGAL/Uncertain.h>
|
||||||
#include <CGAL/Intersection_traits_2.h>
|
#include <CGAL/Intersection_traits_2.h>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
@ -453,6 +455,7 @@ intersection(const typename K::Segment_2 &seg1,
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
CGAL_INTERSECTION_FUNCTION_SELF(Segment_2, 2)
|
CGAL_INTERSECTION_FUNCTION_SELF(Segment_2, 2)
|
||||||
CGAL_DO_INTERSECT_FUNCTION_SELF(Segment_2, 2)
|
CGAL_DO_INTERSECT_FUNCTION_SELF(Segment_2, 2)
|
||||||
|
|
@ -24,20 +24,20 @@
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Geert-Jan Giezeman
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_SEGMENT_2_TRIANGLE_2_INTERSECTION_H
|
#ifndef CGAL_INTERSECTIONS_2_SEGMENT_2_TRIANGLE_2_H
|
||||||
#define CGAL_SEGMENT_2_TRIANGLE_2_INTERSECTION_H
|
#define CGAL_INTERSECTIONS_2_SEGMENT_2_TRIANGLE_2_H
|
||||||
|
|
||||||
#include <CGAL/Segment_2.h>
|
#include <CGAL/Segment_2.h>
|
||||||
#include <CGAL/Triangle_2.h>
|
#include <CGAL/Triangle_2.h>
|
||||||
#include <CGAL/Point_2.h>
|
|
||||||
#include <CGAL/Line_2.h>
|
|
||||||
#include <CGAL/kernel_assertions.h>
|
#include <CGAL/kernel_assertions.h>
|
||||||
#include <CGAL/number_utils.h>
|
#include <CGAL/number_utils.h>
|
||||||
#include <CGAL/Straight_2.h>
|
#include <CGAL/Intersections_2/internal/Straight_2.h>
|
||||||
#include <CGAL/Intersection_traits_2.h>
|
#include <CGAL/Intersection_traits_2.h>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
@ -198,6 +198,7 @@ inline bool do_intersect(
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
CGAL_INTERSECTION_FUNCTION(Segment_2, Triangle_2, 2)
|
CGAL_INTERSECTION_FUNCTION(Segment_2, Triangle_2, 2)
|
||||||
CGAL_DO_INTERSECT_FUNCTION(Segment_2, Triangle_2, 2)
|
CGAL_DO_INTERSECT_FUNCTION(Segment_2, Triangle_2, 2)
|
||||||
|
|
@ -24,11 +24,15 @@
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Geert-Jan Giezeman
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_2_TRIANGLE_2_TRIANGLE_2_H
|
||||||
|
#define CGAL_INTERSECTIONS_2_TRIANGLE_2_TRIANGLE_2_H
|
||||||
|
|
||||||
#ifndef CGAL_INTERSECTION_2_3_H
|
#include <CGAL/Intersections_2/internal/Triangle_2_Triangle_2_do_intersect_impl.h>
|
||||||
#define CGAL_INTERSECTION_2_3_H
|
#include <CGAL/Intersections_2/internal/Triangle_2_Triangle_2_intersection_impl.h>
|
||||||
|
|
||||||
#include <CGAL/Circle_2_Circle_2_intersection.h>
|
namespace CGAL {
|
||||||
#include <CGAL/Circle_2_Line_2_intersection.h>
|
CGAL_DO_INTERSECT_FUNCTION_SELF(Triangle_2, 2)
|
||||||
|
CGAL_INTERSECTION_FUNCTION_SELF(Triangle_2, 2)
|
||||||
|
} // namespace CGAL
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -0,0 +1,112 @@
|
||||||
|
// Copyright (c) 2018 GeometryFactory (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Andreas Fabri
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERNAL_INTERSECTIONS_2_BBOX_2_CIRCLE_2_DO_INTERSECT_H
|
||||||
|
#define CGAL_INTERNAL_INTERSECTIONS_2_BBOX_2_CIRCLE_2_DO_INTERSECT_H
|
||||||
|
|
||||||
|
#include <CGAL/Circle_2.h>
|
||||||
|
#include <CGAL/Bbox_2.h>
|
||||||
|
|
||||||
|
#include <CGAL/number_utils.h>
|
||||||
|
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
|
namespace internal {
|
||||||
|
|
||||||
|
template <class K, class Box3>
|
||||||
|
bool do_intersect_circle_box_2(const typename K::Circle_2& circle,
|
||||||
|
const Box3& bbox,
|
||||||
|
const K&)
|
||||||
|
{
|
||||||
|
typedef typename K::FT FT;
|
||||||
|
typedef typename K::Point_2 Point;
|
||||||
|
FT d = FT(0);
|
||||||
|
FT distance = FT(0);
|
||||||
|
Point center = circle.center();
|
||||||
|
|
||||||
|
if(center.x() < FT(bbox.xmin()))
|
||||||
|
{
|
||||||
|
d = FT(bbox.xmin()) - center.x();
|
||||||
|
distance += d * d;
|
||||||
|
}
|
||||||
|
else if(center.x() > FT(bbox.xmax()))
|
||||||
|
{
|
||||||
|
d = center.x() - FT(bbox.xmax());
|
||||||
|
distance += d * d;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(center.y() < FT(bbox.ymin()))
|
||||||
|
{
|
||||||
|
d = FT(bbox.ymin()) - center.y();
|
||||||
|
distance += d * d;
|
||||||
|
}
|
||||||
|
else if(center.y() > FT(bbox.ymax()))
|
||||||
|
{
|
||||||
|
d = center.y() - FT(bbox.ymax());
|
||||||
|
distance += d * d;
|
||||||
|
}
|
||||||
|
|
||||||
|
return distance <= circle.squared_radius();
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class K>
|
||||||
|
bool do_intersect(const CGAL::Bbox_2& bbox,
|
||||||
|
const typename K::Circle_2& circle,
|
||||||
|
const K&)
|
||||||
|
{
|
||||||
|
return do_intersect_circle_box_2(circle, bbox, K());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template <class K>
|
||||||
|
bool do_intersect(const typename K::Circle_2& circle,
|
||||||
|
const CGAL::Bbox_2& bbox,
|
||||||
|
const K&)
|
||||||
|
{
|
||||||
|
return do_intersect_circle_box_2(circle, bbox, K());
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class K>
|
||||||
|
bool do_intersect(const typename K::Iso_rectangle_2& bbox,
|
||||||
|
const typename K::Circle_2& circle,
|
||||||
|
const K&)
|
||||||
|
{
|
||||||
|
return do_intersect_circle_box_2(circle, bbox, K());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template <class K>
|
||||||
|
bool do_intersect(const typename K::Circle_2& circle,
|
||||||
|
const typename K::Iso_rectangle_2& bbox,
|
||||||
|
const K&)
|
||||||
|
{
|
||||||
|
return do_intersect_circle_box_2(circle, bbox, K());
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
} //namespace CGAL
|
||||||
|
|
||||||
|
#endif // CGAL_INTERNAL_INTERSECTIONS_2_BBOX_2_CIRCLE_2_DO_INTERSECT_H
|
||||||
|
|
@ -24,15 +24,17 @@
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Geert-Jan Giezeman
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_STRAIGHT_2_H
|
#ifndef CGAL_INTERSECTIONS_2_INTERNAL_STRAIGHT_2_H
|
||||||
#define CGAL_STRAIGHT_2_H
|
#define CGAL_INTERSECTIONS_2_INTERNAL_STRAIGHT_2_H
|
||||||
|
|
||||||
#include <CGAL/Line_2_Line_2_intersection.h>
|
#include <CGAL/Intersections_2/Line_2_Line_2.h>
|
||||||
#include <CGAL/squared_distance_utils.h>
|
#include <CGAL/squared_distance_utils.h>
|
||||||
#include <CGAL/Kernel/global_functions_internal_2.h>
|
#include <CGAL/Kernel/global_functions_internal_2.h>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
class Straight_2_base_ {
|
class Straight_2_base_ {
|
||||||
|
|
@ -267,7 +269,7 @@ sign_of_cross(typename K::Direction_2 const &dir1,
|
||||||
typename K::Direction_2 const &dir2,
|
typename K::Direction_2 const &dir2,
|
||||||
const K&)
|
const K&)
|
||||||
{
|
{
|
||||||
return static_cast<int>(internal::orientation(dir1.to_vector(),
|
return static_cast<int>(CGAL::internal::orientation(dir1.to_vector(),
|
||||||
dir2.to_vector(), K()));
|
dir2.to_vector(), K()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -351,12 +353,7 @@ collinear_order(typename K::Point_2 const &pt1, typename K::Point_2 const & pt2)
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
} //namespace CGAL
|
} //namespace CGAL
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
|
|
@ -172,9 +172,7 @@ bool do_intersect(const typename K::Triangle_2 &t1,
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
CGAL_DO_INTERSECT_FUNCTION_SELF(Triangle_2, 2)
|
|
||||||
|
|
||||||
} //namespace CGAL
|
} //namespace CGAL
|
||||||
|
|
||||||
#endif //CGAL_TRIANGLE_2_TRIANGLE_2_DO_INTERSECT_H
|
#endif //CGAL_TRIANGLE_2_TRIANGLE_2_DO_INTERSECT_H
|
||||||
|
|
@ -23,18 +23,18 @@
|
||||||
//
|
//
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Geert-Jan Giezeman
|
||||||
|
|
||||||
#include <CGAL/Segment_2.h>
|
|
||||||
#include <CGAL/Triangle_2.h>
|
#include <CGAL/Triangle_2.h>
|
||||||
#include <CGAL/Line_2.h>
|
|
||||||
#include <CGAL/kernel_assertions.h>
|
#include <CGAL/kernel_assertions.h>
|
||||||
#include <CGAL/number_utils.h>
|
#include <CGAL/number_utils.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <CGAL/Line_2_Line_2_intersection.h>
|
#include <CGAL/Intersections_2/Line_2_Line_2.h>
|
||||||
#include <CGAL/Intersection_traits_2.h>
|
#include <CGAL/Intersection_traits_2.h>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
@ -349,7 +349,5 @@ intersection(const typename K::Triangle_2 &tr1,
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
CGAL_INTERSECTION_FUNCTION_SELF(Triangle_2, 2)
|
|
||||||
|
|
||||||
} //namespace CGAL
|
} //namespace CGAL
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
// Copyright (c) 2000
|
|
||||||
// Utrecht University (The Netherlands),
|
|
||||||
// ETH Zurich (Switzerland),
|
|
||||||
// INRIA Sophia-Antipolis (France),
|
|
||||||
// Max-Planck-Institute Saarbruecken (Germany),
|
|
||||||
// and Tel-Aviv University (Israel). All rights reserved.
|
|
||||||
//
|
|
||||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public License as
|
|
||||||
// published by the Free Software Foundation; either version 3 of the License,
|
|
||||||
// or (at your option) any later version.
|
|
||||||
//
|
|
||||||
// Licensees holding a valid commercial license may use this file in
|
|
||||||
// accordance with the commercial license agreement provided with the software.
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL$
|
|
||||||
// $Id$
|
|
||||||
// SPDX-License-Identifier: LGPL-3.0+
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Geert-Jan Giezeman
|
|
||||||
|
|
||||||
#include <CGAL/Line_2_Iso_rectangle_2_intersection.h>
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
// Copyright (c) 2000
|
|
||||||
// Utrecht University (The Netherlands),
|
|
||||||
// ETH Zurich (Switzerland),
|
|
||||||
// INRIA Sophia-Antipolis (France),
|
|
||||||
// Max-Planck-Institute Saarbruecken (Germany),
|
|
||||||
// and Tel-Aviv University (Israel). All rights reserved.
|
|
||||||
//
|
|
||||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public License as
|
|
||||||
// published by the Free Software Foundation; either version 3 of the License,
|
|
||||||
// or (at your option) any later version.
|
|
||||||
//
|
|
||||||
// Licensees holding a valid commercial license may use this file in
|
|
||||||
// accordance with the commercial license agreement provided with the software.
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL$
|
|
||||||
// $Id$
|
|
||||||
// SPDX-License-Identifier: LGPL-3.0+
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Geert-Jan Giezeman
|
|
||||||
|
|
||||||
#include <CGAL/Segment_2_Iso_rectangle_2_intersection.h>
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
// Copyright (c) 2000
|
|
||||||
// Utrecht University (The Netherlands),
|
|
||||||
// ETH Zurich (Switzerland),
|
|
||||||
// INRIA Sophia-Antipolis (France),
|
|
||||||
// Max-Planck-Institute Saarbruecken (Germany),
|
|
||||||
// and Tel-Aviv University (Israel). All rights reserved.
|
|
||||||
//
|
|
||||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public License as
|
|
||||||
// published by the Free Software Foundation; either version 3 of the License,
|
|
||||||
// or (at your option) any later version.
|
|
||||||
//
|
|
||||||
// Licensees holding a valid commercial license may use this file in
|
|
||||||
// accordance with the commercial license agreement provided with the software.
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL$
|
|
||||||
// $Id$
|
|
||||||
// SPDX-License-Identifier: LGPL-3.0+
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Geert-Jan Giezeman
|
|
||||||
|
|
||||||
#include <CGAL/Bbox_2_Line_2_intersection.h>
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
// Copyright (c) 2000
|
|
||||||
// Utrecht University (The Netherlands),
|
|
||||||
// ETH Zurich (Switzerland),
|
|
||||||
// INRIA Sophia-Antipolis (France),
|
|
||||||
// Max-Planck-Institute Saarbruecken (Germany),
|
|
||||||
// and Tel-Aviv University (Israel). All rights reserved.
|
|
||||||
//
|
|
||||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public License as
|
|
||||||
// published by the Free Software Foundation; either version 3 of the License,
|
|
||||||
// or (at your option) any later version.
|
|
||||||
//
|
|
||||||
// Licensees holding a valid commercial license may use this file in
|
|
||||||
// accordance with the commercial license agreement provided with the software.
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL$
|
|
||||||
// $Id$
|
|
||||||
// SPDX-License-Identifier: LGPL-3.0+
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Geert-Jan Giezeman
|
|
||||||
|
|
||||||
#include <CGAL/Point_2_Line_2_intersection.h>
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
// Copyright (c) 2000
|
|
||||||
// Utrecht University (The Netherlands),
|
|
||||||
// ETH Zurich (Switzerland),
|
|
||||||
// INRIA Sophia-Antipolis (France),
|
|
||||||
// Max-Planck-Institute Saarbruecken (Germany),
|
|
||||||
// and Tel-Aviv University (Israel). All rights reserved.
|
|
||||||
//
|
|
||||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public License as
|
|
||||||
// published by the Free Software Foundation; either version 3 of the License,
|
|
||||||
// or (at your option) any later version.
|
|
||||||
//
|
|
||||||
// Licensees holding a valid commercial license may use this file in
|
|
||||||
// accordance with the commercial license agreement provided with the software.
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL$
|
|
||||||
// $Id$
|
|
||||||
// SPDX-License-Identifier: LGPL-3.0+
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Geert-Jan Giezeman
|
|
||||||
|
|
||||||
#include <CGAL/Ray_2_Line_2_intersection.h>
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
// Copyright (c) 2000
|
|
||||||
// Utrecht University (The Netherlands),
|
|
||||||
// ETH Zurich (Switzerland),
|
|
||||||
// INRIA Sophia-Antipolis (France),
|
|
||||||
// Max-Planck-Institute Saarbruecken (Germany),
|
|
||||||
// and Tel-Aviv University (Israel). All rights reserved.
|
|
||||||
//
|
|
||||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public License as
|
|
||||||
// published by the Free Software Foundation; either version 3 of the License,
|
|
||||||
// or (at your option) any later version.
|
|
||||||
//
|
|
||||||
// Licensees holding a valid commercial license may use this file in
|
|
||||||
// accordance with the commercial license agreement provided with the software.
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL$
|
|
||||||
// $Id$
|
|
||||||
// SPDX-License-Identifier: LGPL-3.0+
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Geert-Jan Giezeman
|
|
||||||
|
|
||||||
#include <CGAL/Segment_2_Line_2_intersection.h>
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
// Copyright (c) 2000
|
|
||||||
// Utrecht University (The Netherlands),
|
|
||||||
// ETH Zurich (Switzerland),
|
|
||||||
// INRIA Sophia-Antipolis (France),
|
|
||||||
// Max-Planck-Institute Saarbruecken (Germany),
|
|
||||||
// and Tel-Aviv University (Israel). All rights reserved.
|
|
||||||
//
|
|
||||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public License as
|
|
||||||
// published by the Free Software Foundation; either version 3 of the License,
|
|
||||||
// or (at your option) any later version.
|
|
||||||
//
|
|
||||||
// Licensees holding a valid commercial license may use this file in
|
|
||||||
// accordance with the commercial license agreement provided with the software.
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL$
|
|
||||||
// $Id$
|
|
||||||
// SPDX-License-Identifier: LGPL-3.0+
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Geert-Jan Giezeman
|
|
||||||
|
|
||||||
#include <CGAL/Point_2_Ray_2_intersection.h>
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
// Copyright (c) 2000
|
|
||||||
// Utrecht University (The Netherlands),
|
|
||||||
// ETH Zurich (Switzerland),
|
|
||||||
// INRIA Sophia-Antipolis (France),
|
|
||||||
// Max-Planck-Institute Saarbruecken (Germany),
|
|
||||||
// and Tel-Aviv University (Israel). All rights reserved.
|
|
||||||
//
|
|
||||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public License as
|
|
||||||
// published by the Free Software Foundation; either version 3 of the License,
|
|
||||||
// or (at your option) any later version.
|
|
||||||
//
|
|
||||||
// Licensees holding a valid commercial license may use this file in
|
|
||||||
// accordance with the commercial license agreement provided with the software.
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL$
|
|
||||||
// $Id$
|
|
||||||
// SPDX-License-Identifier: LGPL-3.0+
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Geert-Jan Giezeman
|
|
||||||
|
|
||||||
#include <CGAL/Point_2_Segment_2_intersection.h>
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
// Copyright (c) 2000
|
|
||||||
// Utrecht University (The Netherlands),
|
|
||||||
// ETH Zurich (Switzerland),
|
|
||||||
// INRIA Sophia-Antipolis (France),
|
|
||||||
// Max-Planck-Institute Saarbruecken (Germany),
|
|
||||||
// and Tel-Aviv University (Israel). All rights reserved.
|
|
||||||
//
|
|
||||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public License as
|
|
||||||
// published by the Free Software Foundation; either version 3 of the License,
|
|
||||||
// or (at your option) any later version.
|
|
||||||
//
|
|
||||||
// Licensees holding a valid commercial license may use this file in
|
|
||||||
// accordance with the commercial license agreement provided with the software.
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL$
|
|
||||||
// $Id$
|
|
||||||
// SPDX-License-Identifier: LGPL-3.0+
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Geert-Jan Giezeman
|
|
||||||
|
|
||||||
#include <CGAL/Ray_2_Segment_2_intersection.h>
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
// Copyright (c) 2000
|
|
||||||
// Utrecht University (The Netherlands),
|
|
||||||
// ETH Zurich (Switzerland),
|
|
||||||
// INRIA Sophia-Antipolis (France),
|
|
||||||
// Max-Planck-Institute Saarbruecken (Germany),
|
|
||||||
// and Tel-Aviv University (Israel). All rights reserved.
|
|
||||||
//
|
|
||||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public License as
|
|
||||||
// published by the Free Software Foundation; either version 3 of the License,
|
|
||||||
// or (at your option) any later version.
|
|
||||||
//
|
|
||||||
// Licensees holding a valid commercial license may use this file in
|
|
||||||
// accordance with the commercial license agreement provided with the software.
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL$
|
|
||||||
// $Id$
|
|
||||||
// SPDX-License-Identifier: LGPL-3.0+
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Geert-Jan Giezeman
|
|
||||||
|
|
||||||
#include <CGAL/Line_2_Triangle_2_intersection.h>
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
// Copyright (c) 2000
|
|
||||||
// Utrecht University (The Netherlands),
|
|
||||||
// ETH Zurich (Switzerland),
|
|
||||||
// INRIA Sophia-Antipolis (France),
|
|
||||||
// Max-Planck-Institute Saarbruecken (Germany),
|
|
||||||
// and Tel-Aviv University (Israel). All rights reserved.
|
|
||||||
//
|
|
||||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public License as
|
|
||||||
// published by the Free Software Foundation; either version 3 of the License,
|
|
||||||
// or (at your option) any later version.
|
|
||||||
//
|
|
||||||
// Licensees holding a valid commercial license may use this file in
|
|
||||||
// accordance with the commercial license agreement provided with the software.
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL$
|
|
||||||
// $Id$
|
|
||||||
// SPDX-License-Identifier: LGPL-3.0+
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Geert-Jan Giezeman
|
|
||||||
|
|
||||||
#include <CGAL/Point_2_Triangle_2_intersection.h>
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
// Copyright (c) 2000
|
|
||||||
// Utrecht University (The Netherlands),
|
|
||||||
// ETH Zurich (Switzerland),
|
|
||||||
// INRIA Sophia-Antipolis (France),
|
|
||||||
// Max-Planck-Institute Saarbruecken (Germany),
|
|
||||||
// and Tel-Aviv University (Israel). All rights reserved.
|
|
||||||
//
|
|
||||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public License as
|
|
||||||
// published by the Free Software Foundation; either version 3 of the License,
|
|
||||||
// or (at your option) any later version.
|
|
||||||
//
|
|
||||||
// Licensees holding a valid commercial license may use this file in
|
|
||||||
// accordance with the commercial license agreement provided with the software.
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL$
|
|
||||||
// $Id$
|
|
||||||
// SPDX-License-Identifier: LGPL-3.0+
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Geert-Jan Giezeman
|
|
||||||
|
|
||||||
#include <CGAL/Ray_2_Triangle_2_intersection.h>
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
// Copyright (c) 2000
|
|
||||||
// Utrecht University (The Netherlands),
|
|
||||||
// ETH Zurich (Switzerland),
|
|
||||||
// INRIA Sophia-Antipolis (France),
|
|
||||||
// Max-Planck-Institute Saarbruecken (Germany),
|
|
||||||
// and Tel-Aviv University (Israel). All rights reserved.
|
|
||||||
//
|
|
||||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public License as
|
|
||||||
// published by the Free Software Foundation; either version 3 of the License,
|
|
||||||
// or (at your option) any later version.
|
|
||||||
//
|
|
||||||
// Licensees holding a valid commercial license may use this file in
|
|
||||||
// accordance with the commercial license agreement provided with the software.
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL$
|
|
||||||
// $Id$
|
|
||||||
// SPDX-License-Identifier: LGPL-3.0+
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Geert-Jan Giezeman
|
|
||||||
|
|
||||||
#include <CGAL/Segment_2_Triangle_2_intersection.h>
|
|
||||||
|
|
@ -28,8 +28,40 @@
|
||||||
#ifndef CGAL_INTERSECTION_2_H
|
#ifndef CGAL_INTERSECTION_2_H
|
||||||
#define CGAL_INTERSECTION_2_H
|
#define CGAL_INTERSECTION_2_H
|
||||||
|
|
||||||
#include <CGAL/intersection_2_1.h>
|
#include <CGAL/Intersections_2/Bbox_2_Circle_2.h>
|
||||||
#include <CGAL/intersection_2_2.h>
|
#include <CGAL/Intersections_2/Bbox_2_Point_2.h>
|
||||||
#include <CGAL/intersection_2_3.h>
|
|
||||||
|
#include <CGAL/Intersections_2/Circle_2_Iso_rectangle_2.h>
|
||||||
|
#include <CGAL/Intersections_2/Circle_2_Circle_2.h>
|
||||||
|
#include <CGAL/Intersections_2/Circle_2_Line_2.h>
|
||||||
|
#include <CGAL/Intersections_2/Circle_2_Point_2.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_2/Iso_rectangle_2_Iso_rectangle_2.h>
|
||||||
|
#include <CGAL/Intersections_2/Iso_rectangle_2_Line_2.h>
|
||||||
|
#include <CGAL/Intersections_2/Iso_rectangle_2_Point_2.h>
|
||||||
|
#include <CGAL/Intersections_2/Iso_rectangle_2_Ray_2.h>
|
||||||
|
#include <CGAL/Intersections_2/Iso_rectangle_2_Segment_2.h>
|
||||||
|
#include <CGAL/Intersections_2/Iso_rectangle_2_Triangle_2.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_2/Line_2_Line_2.h>
|
||||||
|
#include <CGAL/Intersections_2/Line_2_Point_2.h>
|
||||||
|
#include <CGAL/Intersections_2/Line_2_Ray_2.h>
|
||||||
|
#include <CGAL/Intersections_2/Line_2_Segment_2.h>
|
||||||
|
#include <CGAL/Intersections_2/Line_2_Triangle_2.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_2/Point_2_Ray_2.h>
|
||||||
|
#include <CGAL/Intersections_2/Point_2_Segment_2.h>
|
||||||
|
#include <CGAL/Intersections_2/Point_2_Point_2.h>
|
||||||
|
#include <CGAL/Intersections_2/Point_2_Triangle_2.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_2/Ray_2_Ray_2.h>
|
||||||
|
#include <CGAL/Intersections_2/Ray_2_Segment_2.h>
|
||||||
|
#include <CGAL/Intersections_2/Ray_2_Triangle_2.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_2/Segment_2_Segment_2.h>
|
||||||
|
#include <CGAL/Intersections_2/Segment_2_Triangle_2.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_2/Triangle_2_Triangle_2.h>
|
||||||
|
|
||||||
|
|
||||||
#endif // CGAL_INTERSECTION_2_H
|
#endif // CGAL_INTERSECTION_2_H
|
||||||
|
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
// Copyright (c) 2000
|
|
||||||
// Utrecht University (The Netherlands),
|
|
||||||
// ETH Zurich (Switzerland),
|
|
||||||
// INRIA Sophia-Antipolis (France),
|
|
||||||
// Max-Planck-Institute Saarbruecken (Germany),
|
|
||||||
// and Tel-Aviv University (Israel). All rights reserved.
|
|
||||||
//
|
|
||||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public License as
|
|
||||||
// published by the Free Software Foundation; either version 3 of the License,
|
|
||||||
// or (at your option) any later version.
|
|
||||||
//
|
|
||||||
// Licensees holding a valid commercial license may use this file in
|
|
||||||
// accordance with the commercial license agreement provided with the software.
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL$
|
|
||||||
// $Id$
|
|
||||||
// SPDX-License-Identifier: LGPL-3.0+
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Geert-Jan Giezeman
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_INTERSECTION_2_1_H
|
|
||||||
#define CGAL_INTERSECTION_2_1_H
|
|
||||||
|
|
||||||
#include <CGAL/Line_2_Line_2_intersection.h>
|
|
||||||
#include <CGAL/Segment_2_Line_2_intersection.h>
|
|
||||||
#include <CGAL/Segment_2_Segment_2_intersection.h>
|
|
||||||
#include <CGAL/Ray_2_Line_2_intersection.h>
|
|
||||||
#include <CGAL/Ray_2_Segment_2_intersection.h>
|
|
||||||
#include <CGAL/Ray_2_Ray_2_intersection.h>
|
|
||||||
#include <CGAL/Point_2_Line_2_intersection.h>
|
|
||||||
#include <CGAL/Point_2_Ray_2_intersection.h>
|
|
||||||
#include <CGAL/Point_2_Segment_2_intersection.h>
|
|
||||||
#include <CGAL/Point_2_Point_2_intersection.h>
|
|
||||||
#include <CGAL/Point_2_Triangle_2_intersection.h>
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
||||||
// Copyright (c) 2000
|
|
||||||
// Utrecht University (The Netherlands),
|
|
||||||
// ETH Zurich (Switzerland),
|
|
||||||
// INRIA Sophia-Antipolis (France),
|
|
||||||
// Max-Planck-Institute Saarbruecken (Germany),
|
|
||||||
// and Tel-Aviv University (Israel). All rights reserved.
|
|
||||||
//
|
|
||||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public License as
|
|
||||||
// published by the Free Software Foundation; either version 3 of the License,
|
|
||||||
// or (at your option) any later version.
|
|
||||||
//
|
|
||||||
// Licensees holding a valid commercial license may use this file in
|
|
||||||
// accordance with the commercial license agreement provided with the software.
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL$
|
|
||||||
// $Id$
|
|
||||||
// SPDX-License-Identifier: LGPL-3.0+
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Geert-Jan Giezeman
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_INTERSECTION_2_2_H
|
|
||||||
#define CGAL_INTERSECTION_2_2_H
|
|
||||||
|
|
||||||
#include <CGAL/Triangle_2_Triangle_2_intersection.h>
|
|
||||||
#include <CGAL/Triangle_2_Line_2_intersection.h>
|
|
||||||
#include <CGAL/Triangle_2_Ray_2_intersection.h>
|
|
||||||
#include <CGAL/Triangle_2_Segment_2_intersection.h>
|
|
||||||
#include <CGAL/Line_2_Iso_rectangle_2_intersection.h>
|
|
||||||
#include <CGAL/Ray_2_Iso_rectangle_2_intersection.h>
|
|
||||||
#include <CGAL/Segment_2_Iso_rectangle_2_intersection.h>
|
|
||||||
#include <CGAL/Point_2_Iso_rectangle_2_intersection.h>
|
|
||||||
#include <CGAL/Iso_rectangle_2_Iso_rectangle_2_intersection.h>
|
|
||||||
#include <CGAL/Triangle_2_Iso_rectangle_2_intersection.h>
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -25,10 +25,10 @@
|
||||||
|
|
||||||
#ifndef CGAL_HEADER_ONLY
|
#ifndef CGAL_HEADER_ONLY
|
||||||
|
|
||||||
#include <CGAL/Bbox_2_Line_2_intersection.h>
|
#include <CGAL/Intersections_2/Bbox_2_Line_2.h>
|
||||||
#include <CGAL/Bbox_2_Line_2_intersection_impl.h>
|
#include <CGAL/Intersections_2/internal/Bbox_2_Line_2_intersection_impl.h>
|
||||||
|
|
||||||
#include <CGAL/Ray_2_Bbox_2_intersection.h>
|
#include <CGAL/Intersections_2/Bbox_2_Ray_2.h>
|
||||||
#include <CGAL/Ray_2_Bbox_2_intersection_impl.h>
|
#include <CGAL/Intersections_2/internal/Ray_2_Bbox_2_intersection_impl.h>
|
||||||
|
|
||||||
#endif // CGAL_HEADER_ONLY
|
#endif // CGAL_HEADER_ONLY
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,17 @@
|
||||||
#include <CGAL/Ray_2.h>
|
#include <CGAL/Ray_2.h>
|
||||||
#include <CGAL/Triangle_2.h>
|
#include <CGAL/Triangle_2.h>
|
||||||
#include <CGAL/Iso_rectangle_2.h>
|
#include <CGAL/Iso_rectangle_2.h>
|
||||||
#include <CGAL/Segment_2_Segment_2_intersection.h>
|
#include <CGAL/Intersections_2/Segment_2_Segment_2.h>
|
||||||
#include <CGAL/Line_2_Line_2_intersection.h>
|
#include <CGAL/Intersections_2/Line_2_Line_2.h>
|
||||||
#include <CGAL/Ray_2_Ray_2_intersection.h>
|
#include <CGAL/Intersections_2/Ray_2_Ray_2.h>
|
||||||
#include <CGAL/Triangle_2_Triangle_2_intersection.h>
|
#include <CGAL/Intersections_2/Triangle_2_Triangle_2.h>
|
||||||
#include <CGAL/Line_2_Iso_rectangle_2_intersection.h>
|
#include <CGAL/Intersections_2/Iso_rectangle_2_Line_2.h>
|
||||||
#include <CGAL/Ray_2_Iso_rectangle_2_intersection.h>
|
#include <CGAL/Intersections_2/Iso_rectangle_2_Ray_2.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_2/Bbox_2_Circle_2.h>
|
||||||
|
#include <CGAL/Intersections_2/Bbox_2_Point_2.h>
|
||||||
|
#include <CGAL/Intersections_2/Circle_2_Iso_rectangle_2.h>
|
||||||
|
#include <CGAL/Intersections_2/Circle_2_Point_2.h>
|
||||||
|
|
||||||
#include <CGAL/Cartesian.h>
|
#include <CGAL/Cartesian.h>
|
||||||
#include <CGAL/Homogeneous.h>
|
#include <CGAL/Homogeneous.h>
|
||||||
|
|
@ -65,6 +70,7 @@ struct Test {
|
||||||
typedef CGAL::Ray_2< K > R;
|
typedef CGAL::Ray_2< K > R;
|
||||||
typedef CGAL::Triangle_2< K > T;
|
typedef CGAL::Triangle_2< K > T;
|
||||||
typedef CGAL::Iso_rectangle_2< K > Rec;
|
typedef CGAL::Iso_rectangle_2< K > Rec;
|
||||||
|
typedef CGAL::Circle_2< K > C;
|
||||||
typedef std::vector<P> Pol;
|
typedef std::vector<P> Pol;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -152,6 +158,17 @@ struct Test {
|
||||||
return P(to_nt(x*w), to_nt(y*w), to_nt(w));
|
return P(to_nt(x*w), to_nt(y*w), to_nt(w));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void B_P()
|
||||||
|
{
|
||||||
|
CGAL::Bbox_2 bb(0,0,10,10);
|
||||||
|
P p(1,0), bl(0,0), tr(10,10);
|
||||||
|
C c(bl,1);
|
||||||
|
Rec r(bl,tr);
|
||||||
|
check_intersection(bb,p,p,true);
|
||||||
|
check_intersection(c,p,p,true);
|
||||||
|
assert(do_intersect(r,c));
|
||||||
|
}
|
||||||
|
|
||||||
void L_L()
|
void L_L()
|
||||||
{
|
{
|
||||||
std::cout << "Line - Line\n";
|
std::cout << "Line - Line\n";
|
||||||
|
|
@ -330,6 +347,7 @@ check_no_intersection (L(p(0, 0), p(10,10)), L(p(8,7), p(1, 0)));
|
||||||
void run()
|
void run()
|
||||||
{
|
{
|
||||||
std::cout << "2D Intersection tests\n";
|
std::cout << "2D Intersection tests\n";
|
||||||
|
B_P();
|
||||||
L_L();
|
L_L();
|
||||||
S_S();
|
S_S();
|
||||||
R_R();
|
R_R();
|
||||||
|
|
|
||||||
|
|
@ -135,6 +135,153 @@ template<typename K>
|
||||||
struct Intersection_traits<K, CGAL::Bbox_3, typename K::Ray_3> :
|
struct Intersection_traits<K, CGAL::Bbox_3, typename K::Ray_3> :
|
||||||
public Intersection_traits<K, CGAL::Bbox_3, typename K::Line_3> {};
|
public Intersection_traits<K, CGAL::Bbox_3, typename K::Line_3> {};
|
||||||
|
|
||||||
|
// Point_3 Iso_cuboid_3, variant of one
|
||||||
|
template<typename K>
|
||||||
|
struct Intersection_traits<K, typename K::Point_3, typename K::Iso_cuboid_3> {
|
||||||
|
typedef typename
|
||||||
|
boost::variant< typename K::Point_3 > variant_type;
|
||||||
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Bbox_3 Point_3, variant of one
|
||||||
|
template<typename K>
|
||||||
|
struct Intersection_traits<K, Bbox_3, typename K::Point_3> {
|
||||||
|
typedef typename
|
||||||
|
boost::variant< typename K::Point_3 > variant_type;
|
||||||
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
struct Intersection_traits<K, typename K::Point_3, Bbox_3> {
|
||||||
|
typedef typename
|
||||||
|
boost::variant< typename K::Point_3 > variant_type;
|
||||||
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Iso_cuboid_3 Point_3, variant of one
|
||||||
|
template<typename K>
|
||||||
|
struct Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Point_3> {
|
||||||
|
typedef typename
|
||||||
|
boost::variant< typename K::Point_3 > variant_type;
|
||||||
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Point_3 Line_3, variant of one
|
||||||
|
template<typename K>
|
||||||
|
struct Intersection_traits<K, typename K::Point_3, typename K::Line_3> {
|
||||||
|
typedef typename
|
||||||
|
boost::variant< typename K::Point_3 > variant_type;
|
||||||
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Line_3 Point_3, variant of one
|
||||||
|
template<typename K>
|
||||||
|
struct Intersection_traits<K, typename K::Line_3, typename K::Point_3> {
|
||||||
|
typedef typename
|
||||||
|
boost::variant< typename K::Point_3 > variant_type;
|
||||||
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Point_3 Ray_3, variant of one
|
||||||
|
template<typename K>
|
||||||
|
struct Intersection_traits<K, typename K::Point_3, typename K::Ray_3> {
|
||||||
|
typedef typename
|
||||||
|
boost::variant< typename K::Point_3 > variant_type;
|
||||||
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Ray_3 Point_3, variant of one
|
||||||
|
template<typename K>
|
||||||
|
struct Intersection_traits<K, typename K::Ray_3, typename K::Point_3> {
|
||||||
|
typedef typename
|
||||||
|
boost::variant< typename K::Point_3 > variant_type;
|
||||||
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Point_3 Segment_3, variant of one
|
||||||
|
template<typename K>
|
||||||
|
struct Intersection_traits<K, typename K::Point_3, typename K::Segment_3> {
|
||||||
|
typedef typename
|
||||||
|
boost::variant< typename K::Point_3 > variant_type;
|
||||||
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Segment_3 Point_3, variant of one
|
||||||
|
template<typename K>
|
||||||
|
struct Intersection_traits<K, typename K::Segment_3, typename K::Point_3> {
|
||||||
|
typedef typename
|
||||||
|
boost::variant< typename K::Point_3 > variant_type;
|
||||||
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Point_3 Point_3, variant of one
|
||||||
|
template<typename K>
|
||||||
|
struct Intersection_traits<K, typename K::Point_3, typename K::Point_3> {
|
||||||
|
typedef typename
|
||||||
|
boost::variant< typename K::Point_3 > variant_type;
|
||||||
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Point_3 Plane_3, variant of one
|
||||||
|
template<typename K>
|
||||||
|
struct Intersection_traits<K, typename K::Point_3, typename K::Plane_3> {
|
||||||
|
typedef typename
|
||||||
|
boost::variant< typename K::Point_3 > variant_type;
|
||||||
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Plane_3 Point_3, variant of one
|
||||||
|
template<typename K>
|
||||||
|
struct Intersection_traits<K, typename K::Plane_3, typename K::Point_3> {
|
||||||
|
typedef typename
|
||||||
|
boost::variant< typename K::Point_3 > variant_type;
|
||||||
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Point_3 Triangle_3, variant of one
|
||||||
|
template<typename K>
|
||||||
|
struct Intersection_traits<K, typename K::Point_3, typename K::Triangle_3> {
|
||||||
|
typedef typename
|
||||||
|
boost::variant< typename K::Point_3 > variant_type;
|
||||||
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
|
};
|
||||||
|
// Triangle_3 Point_3, variant of one
|
||||||
|
template<typename K>
|
||||||
|
struct Intersection_traits<K, typename K::Triangle_3, typename K::Point_3> {
|
||||||
|
typedef typename
|
||||||
|
boost::variant< typename K::Point_3 > variant_type;
|
||||||
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Point_3 Tetrahedron_3, variant of one
|
||||||
|
template<typename K>
|
||||||
|
struct Intersection_traits<K, typename K::Point_3, typename K::Tetrahedron_3> {
|
||||||
|
typedef typename
|
||||||
|
boost::variant< typename K::Point_3 > variant_type;
|
||||||
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
|
};
|
||||||
|
// Tetrahedron_3 Point_3, variant of one
|
||||||
|
template<typename K>
|
||||||
|
struct Intersection_traits<K, typename K::Tetrahedron_3, typename K::Point_3> {
|
||||||
|
typedef typename
|
||||||
|
boost::variant< typename K::Point_3 > variant_type;
|
||||||
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Point_3 Sphere_3, variant of one
|
||||||
|
template<typename K>
|
||||||
|
struct Intersection_traits<K, typename K::Point_3, typename K::Sphere_3> {
|
||||||
|
typedef typename
|
||||||
|
boost::variant< typename K::Point_3 > variant_type;
|
||||||
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
|
};
|
||||||
|
// Sphere_3 Point_3, variant of one
|
||||||
|
template<typename K>
|
||||||
|
struct Intersection_traits<K, typename K::Sphere_3, typename K::Point_3> {
|
||||||
|
typedef typename
|
||||||
|
boost::variant< typename K::Point_3 > variant_type;
|
||||||
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
|
};
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
#endif // !(CGAL_INTERSECTION_VERSION < 2)
|
#endif // !(CGAL_INTERSECTION_VERSION < 2)
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
// Copyright (c) 2000
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
// Utrecht University (The Netherlands),
|
// All rights reserved.
|
||||||
// ETH Zurich (Switzerland),
|
|
||||||
// INRIA Sophia-Antipolis (France),
|
|
||||||
// Max-Planck-Institute Saarbruecken (Germany),
|
|
||||||
// and Tel-Aviv University (Israel). All rights reserved.
|
|
||||||
//
|
//
|
||||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public License as
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
|
@ -21,6 +17,25 @@
|
||||||
// SPDX-License-Identifier: LGPL-3.0+
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
#include <CGAL/Ray_2_Iso_rectangle_2_intersection.h>
|
#ifndef CGAL_INTERSECTIONS_3_BBOX_3_BBOX_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_BBOX_3_BBOX_3_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <CGAL/Bbox_3.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
bool
|
||||||
|
inline
|
||||||
|
do_intersect(const CGAL::Bbox_3& c,
|
||||||
|
const CGAL::Bbox_3& bbox)
|
||||||
|
{
|
||||||
|
return CGAL::do_overlap(c, bbox);
|
||||||
|
}
|
||||||
|
|
||||||
|
} //namespace CGAL
|
||||||
|
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_3_BBOX_3_BBOX_3_H
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_3_BBOX_3_ISO_CUBOID_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_BBOX_3_ISO_CUBOID_3_H
|
||||||
|
|
||||||
|
#include <CGAL/Bbox_3.h>
|
||||||
|
#include <CGAL/Iso_cuboid_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_3/internal/Bbox_3_Iso_cuboid_3_do_intersect.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
bool do_intersect(const CGAL::Bbox_3& a,
|
||||||
|
const Iso_cuboid_3<K>& b) {
|
||||||
|
return K().do_intersect_3_object()(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
bool do_intersect(const Iso_cuboid_3<K>& a,
|
||||||
|
const CGAL::Bbox_3& b) {
|
||||||
|
return K().do_intersect_3_object()(b, a);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace CGAL
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_3_BBOX_3_ISO_CUBOID_3_H
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_3_BBOX_3_LINE_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_BBOX_3_LINE_3_H
|
||||||
|
|
||||||
|
#include <CGAL/Bbox_3.h>
|
||||||
|
#include <CGAL/Line_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_3/internal/intersection_3_1_impl.h>
|
||||||
|
#include <CGAL/Intersections_3/internal/Bbox_3_Line_3_do_intersect.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
bool do_intersect(const CGAL::Bbox_3& a,
|
||||||
|
const Line_3<K>& b) {
|
||||||
|
return K().do_intersect_3_object()(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
bool do_intersect(const Line_3<K>& a,
|
||||||
|
const CGAL::Bbox_3& b) {
|
||||||
|
return K().do_intersect_3_object()(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
typename Intersection_traits<K, typename K::Line_3, Bbox_3>::result_type
|
||||||
|
intersection(const CGAL::Bbox_3& a,
|
||||||
|
const Line_3<K>& b) {
|
||||||
|
return K().intersect_3_object()(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
typename Intersection_traits<K, typename K::Line_3, Bbox_3>::result_type
|
||||||
|
intersection(const Line_3<K>& a,
|
||||||
|
const CGAL::Bbox_3& b) {
|
||||||
|
return K().intersect_3_object()(a, b);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_3_BBOX_3_LINE_3_H
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_3_BBOX_3_PLANE_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_BBOX_3_PLANE_3_H
|
||||||
|
|
||||||
|
#include <CGAL/Bbox_3.h>
|
||||||
|
#include <CGAL/Plane_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_3/internal/Bbox_3_Plane_3_do_intersect.h>
|
||||||
|
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
bool do_intersect(const CGAL::Bbox_3& a,
|
||||||
|
const Plane_3<K>& b) {
|
||||||
|
return K().do_intersect_3_object()(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
bool do_intersect(const Plane_3<K>& a,
|
||||||
|
const CGAL::Bbox_3& b) {
|
||||||
|
return K().do_intersect_3_object()(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_3_BBOX_3_PLANE_3_H
|
||||||
|
|
@ -0,0 +1,74 @@
|
||||||
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_3_BBOX_3_POINT_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_BBOX_3_POINT_3_H
|
||||||
|
|
||||||
|
#include <CGAL/Bbox_3.h>
|
||||||
|
#include <CGAL/Point_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_3/internal/intersection_3_1_impl.h>
|
||||||
|
#include <CGAL/Intersections_3/Iso_cuboid_3_Point_3.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
bool do_intersect(const CGAL::Bbox_3& a,
|
||||||
|
const Point_3<K>& b) {
|
||||||
|
Point_3<K> bl(a.xmin(), a.ymin(),a.zmin()), tr(a.xmax(), a.ymax(),a.zmax());
|
||||||
|
|
||||||
|
Iso_cuboid_3<K> ic(bl,tr);
|
||||||
|
return K().do_intersect_3_object()(ic, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
bool do_intersect(const Point_3<K>& a,
|
||||||
|
const CGAL::Bbox_3& b) {
|
||||||
|
return do_intersect(b,a);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
typename Intersection_traits<K, typename K::Point_3, CGAL::Bbox_3>::result_type
|
||||||
|
intersection(const Point_3<K>& a,
|
||||||
|
const CGAL::Bbox_3& b)
|
||||||
|
{
|
||||||
|
if (do_intersect(a,b))
|
||||||
|
return Intersections::internal::intersection_return<typename K::Intersect_3, typename K::Point_3, CGAL::Bbox_3>(a);
|
||||||
|
return Intersections::internal::intersection_return<typename K::Intersect_3, typename K::Point_3, CGAL::Bbox_3>();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
typename Intersection_traits<K, CGAL::Bbox_3, typename K::Point_3>::result_type
|
||||||
|
intersection(const CGAL::Bbox_3& b,
|
||||||
|
const Point_3<K>& a)
|
||||||
|
{
|
||||||
|
if (do_intersect(a,b))
|
||||||
|
return Intersections::internal::intersection_return<typename K::Intersect_3, CGAL::Bbox_3, typename K::Point_3>(a);
|
||||||
|
return Intersections::internal::intersection_return<typename K::Intersect_3, CGAL::Bbox_3, typename K::Point_3>();
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace CGAL
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_3_BBOX_3_POINT_3_H
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_3_BBOX_3_RAY_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_BBOX_3_RAY_3_H
|
||||||
|
|
||||||
|
#include <CGAL/Bbox_3.h>
|
||||||
|
#include <CGAL/Ray_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_3/internal/intersection_3_1_impl.h>
|
||||||
|
#include <CGAL/Intersections_3/internal/Bbox_3_Ray_3_do_intersect.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
bool do_intersect(const CGAL::Bbox_3& a,
|
||||||
|
const Ray_3<K>& b) {
|
||||||
|
return K().do_intersect_3_object()(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
bool do_intersect(const Ray_3<K>& a,
|
||||||
|
const CGAL::Bbox_3& b) {
|
||||||
|
return K().do_intersect_3_object()(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
typename Intersection_traits<K, typename K::Ray_3, Bbox_3>::result_type
|
||||||
|
intersection(const CGAL::Bbox_3& a,
|
||||||
|
const Ray_3<K>& b) {
|
||||||
|
return K().intersect_3_object()(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
typename Intersection_traits<K, typename K::Ray_3, Bbox_3>::result_type
|
||||||
|
intersection(const Ray_3<K>& a,
|
||||||
|
const CGAL::Bbox_3& b) {
|
||||||
|
return K().intersect_3_object()(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif // CGAL_INTERSECTIONS_3_BBOX_3_RAY_3_H
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_3_BBOX_3_SEGMENT_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_BBOX_3_SEGMENT_3_H
|
||||||
|
|
||||||
|
#include <CGAL/Bbox_3.h>
|
||||||
|
#include <CGAL/Segment_3.h>
|
||||||
|
#include <CGAL/Intersections_3/internal/intersection_3_1_impl.h>
|
||||||
|
#include <CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
bool do_intersect(const CGAL::Bbox_3& a,
|
||||||
|
const Segment_3<K>& b) {
|
||||||
|
return K().do_intersect_3_object()(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
bool do_intersect(const Segment_3<K>& a,
|
||||||
|
const CGAL::Bbox_3& b) {
|
||||||
|
return K().do_intersect_3_object()(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
typename Intersection_traits<K, typename K::Segment_3, Bbox_3>::result_type
|
||||||
|
intersection(const CGAL::Bbox_3& a,
|
||||||
|
const Segment_3<K>& b) {
|
||||||
|
return K().intersect_3_object()(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
typename Intersection_traits<K, typename K::Segment_3, Bbox_3>::result_type
|
||||||
|
intersection(const Segment_3<K>& a,
|
||||||
|
const CGAL::Bbox_3& b) {
|
||||||
|
return K().intersect_3_object()(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace CGAL
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_3_BBOX_3_SEGMENT_3_H
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_3_BBOX_3_SPHERE_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_BBOX_3_SPHERE_3_H
|
||||||
|
|
||||||
|
#include <CGAL/Bbox_3.h>
|
||||||
|
#include <CGAL/Sphere_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_3/internal/Bbox_3_Sphere_3_do_intersect.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
bool do_intersect(const CGAL::Bbox_3& a,
|
||||||
|
const Sphere_3<K>& b) {
|
||||||
|
return K().do_intersect_3_object()(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
bool do_intersect(const Sphere_3<K>& a,
|
||||||
|
const CGAL::Bbox_3& b) {
|
||||||
|
return K().do_intersect_3_object()(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_3_BBOX_3_SPHERE_3_H
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_3_BBOX_3_TETRAHEDRON_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_BBOX_3_TETRAHEDRON_3_H
|
||||||
|
|
||||||
|
#include <CGAL/Bbox_3.h>
|
||||||
|
#include <CGAL/Tetrahedron_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_3/internal/Tetrahedron_3_Bounded_3_do_intersect.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
bool do_intersect(const CGAL::Bbox_3& a,
|
||||||
|
const Tetrahedron_3<K>& b) {
|
||||||
|
return K().do_intersect_3_object()(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
bool do_intersect(const Tetrahedron_3<K>& a,
|
||||||
|
const CGAL::Bbox_3& b) {
|
||||||
|
return K().do_intersect_3_object()(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace CGAL
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_3_BBOX_3_TETRAHEDRON_3_H
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_3_BBOX_3_TRIANGLE_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_BBOX_3_TRIANGLE_3_H
|
||||||
|
|
||||||
|
#include <CGAL/Bbox_3.h>
|
||||||
|
#include <CGAL/Triangle_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_3/internal/Bbox_3_Triangle_3_do_intersect.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
bool do_intersect(const CGAL::Bbox_3& a,
|
||||||
|
const Triangle_3<K>& b) {
|
||||||
|
return K().do_intersect_3_object()(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename K>
|
||||||
|
bool do_intersect(const Triangle_3<K>& a,
|
||||||
|
const CGAL::Bbox_3& b) {
|
||||||
|
return K().do_intersect_3_object()(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} // namespace CGAL
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_3_BBOX_3_TRIANGLE_3_H
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_3_ISO_CUBOID_3_ISO_CUBOID_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_ISO_CUBOID_3_ISO_CUBOID_3_H
|
||||||
|
|
||||||
|
#include <CGAL/Iso_cuboid_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_3/internal/intersection_3_1_impl.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
CGAL_INTERSECTION_FUNCTION_SELF(Iso_cuboid_3, 3)
|
||||||
|
CGAL_DO_INTERSECT_FUNCTION_SELF(Iso_cuboid_3, 3)
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_3_ISO_CUBOID_3_ISO_CUBOID_3_H
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
// Copyright (c) 2000
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
// Utrecht University (The Netherlands),
|
// All rights reserved.
|
||||||
// ETH Zurich (Switzerland),
|
|
||||||
// INRIA Sophia-Antipolis (France),
|
|
||||||
// Max-Planck-Institute Saarbruecken (Germany),
|
|
||||||
// and Tel-Aviv University (Israel). All rights reserved.
|
|
||||||
//
|
//
|
||||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public License as
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
|
@ -21,13 +17,19 @@
|
||||||
// SPDX-License-Identifier: LGPL-3.0+
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_3_ISO_CUBOID_3_LINE_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_ISO_CUBOID_3_LINE_3_H
|
||||||
|
|
||||||
#ifndef CGAL_TRIANGLE_2_TRIANGLE_2_INTERSECTION_H
|
#include <CGAL/Intersections_3/internal/intersection_3_1_impl.h>
|
||||||
#define CGAL_TRIANGLE_2_TRIANGLE_2_INTERSECTION_H
|
#include <CGAL/Iso_cuboid_3.h>
|
||||||
|
#include <CGAL/Line_3.h>
|
||||||
|
|
||||||
#include <CGAL/Triangle_2_Triangle_2_do_intersect.h>
|
namespace CGAL {
|
||||||
#include <CGAL/Intersections_2/Triangle_2_Triangle_2_intersection_impl.h>
|
CGAL_DO_INTERSECT_FUNCTION(Iso_cuboid_3,Line_3, 3)
|
||||||
|
CGAL_INTERSECTION_FUNCTION(Line_3, Iso_cuboid_3, 3)
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif // CGAL_INTERSECTIONS_3_BBOX_3_LINE_3_H
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
// Copyright (c) 2000
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
// Utrecht University (The Netherlands),
|
// All rights reserved.
|
||||||
// ETH Zurich (Switzerland),
|
|
||||||
// INRIA Sophia-Antipolis (France),
|
|
||||||
// Max-Planck-Institute Saarbruecken (Germany),
|
|
||||||
// and Tel-Aviv University (Israel). All rights reserved.
|
|
||||||
//
|
//
|
||||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public License as
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
|
@ -21,13 +17,19 @@
|
||||||
// SPDX-License-Identifier: LGPL-3.0+
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_3_ISO_CUBOID_3_PLANE_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_ISO_CUBOID_3_PLANE_3_H
|
||||||
|
|
||||||
|
#include <CGAL/Iso_cuboid_3.h>
|
||||||
|
#include <CGAL/Plane_3.h>
|
||||||
|
#include <CGAL/Intersections_3/internal/Bbox_3_Plane_3_do_intersect.h>
|
||||||
|
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
CGAL_DO_INTERSECT_FUNCTION(Iso_cuboid_3, Plane_3, 3)
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef CGAL_BBOX_2_INTERSECTIONS_H
|
#endif // CGAL_INTERSECTIONS_3_ISO_CUBOID_3_PLANE_3_H
|
||||||
#define CGAL_BBOX_2_INTERSECTIONS_H
|
|
||||||
|
|
||||||
#include <CGAL/Bbox_2_Line_2_intersection.h>
|
|
||||||
#include <CGAL/Ray_2_Bbox_2_intersection.h>
|
|
||||||
#endif // CGAL_BBOX_2_INTERSECTIONS_H
|
|
||||||
|
|
@ -0,0 +1,83 @@
|
||||||
|
// Copyright (c) 2018 INRIA Sophia-Antipolis (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Maxime Gimeno
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_3_ISO_CUBOID_3_POINT_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_ISO_CUBOID_3_POINT_3_H
|
||||||
|
|
||||||
|
#include <CGAL/Iso_cuboid_3.h>
|
||||||
|
#include <CGAL/Point_3.h>
|
||||||
|
#include <CGAL/Intersection_traits_3.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
namespace Intersections {
|
||||||
|
namespace internal {
|
||||||
|
|
||||||
|
template <class K>
|
||||||
|
inline
|
||||||
|
bool
|
||||||
|
do_intersect(const typename K::Point_3 &pt,
|
||||||
|
const typename K::Iso_cuboid_3 &iso,
|
||||||
|
const K&)
|
||||||
|
{
|
||||||
|
return !iso.has_on_unbounded_side(pt);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class K>
|
||||||
|
inline
|
||||||
|
bool
|
||||||
|
do_intersect(const typename K::Iso_cuboid_3 &iso,
|
||||||
|
const typename K::Point_3 &pt,
|
||||||
|
const K&)
|
||||||
|
{
|
||||||
|
return !iso.has_on_unbounded_side(pt);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class K>
|
||||||
|
typename CGAL::Intersection_traits
|
||||||
|
<K, typename K::Point_3, typename K::Iso_cuboid_3>::result_type
|
||||||
|
intersection(const typename K::Point_3 &pt,
|
||||||
|
const typename K::Iso_cuboid_3 &iso,
|
||||||
|
const K& k)
|
||||||
|
{
|
||||||
|
if (internal::do_intersect(pt,iso,k))
|
||||||
|
return intersection_return<typename K::Intersect_3, typename K::Point_3, typename K::Iso_cuboid_3>(pt);
|
||||||
|
return intersection_return<typename K::Intersect_3, typename K::Point_3, typename K::Iso_cuboid_3>();
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class K>
|
||||||
|
typename CGAL::Intersection_traits
|
||||||
|
<K, typename K::Point_3, typename K::Iso_cuboid_3>::result_type
|
||||||
|
intersection(const typename K::Iso_cuboid_3 &iso,
|
||||||
|
const typename K::Point_3 &pt,
|
||||||
|
const K& k)
|
||||||
|
{
|
||||||
|
return internal::intersection(pt, iso, k);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
|
CGAL_INTERSECTION_FUNCTION(Point_3, Iso_cuboid_3, 3)
|
||||||
|
CGAL_DO_INTERSECT_FUNCTION(Point_3, Iso_cuboid_3, 3)
|
||||||
|
|
||||||
|
} //namespace CGAL
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_3_ISO_CUBOID_3_POINT_3_H
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_3_ISO_CUBOID_3_RAY_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_ISO_CUBOID_3_RAY_3_H
|
||||||
|
|
||||||
|
#include <CGAL/Iso_cuboid_3.h>
|
||||||
|
#include <CGAL/Ray_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_3/internal/intersection_3_1_impl.h>
|
||||||
|
#include <CGAL/Intersections_3/internal/Iso_cuboid_3_Ray_3_do_intersect.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
CGAL_DO_INTERSECT_FUNCTION(Iso_cuboid_3,Ray_3, 3)
|
||||||
|
CGAL_INTERSECTION_FUNCTION(Ray_3, Iso_cuboid_3, 3)
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_3_ISSO_CUBOID_3_RAY_3_H
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_3_ISO_CUBOID_3_SEGMENT_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_ISO_CUBOID_3_SEGMENT_3_H
|
||||||
|
|
||||||
|
#include <CGAL/Iso_cuboid_3.h>
|
||||||
|
#include <CGAL/Segment_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_3/internal/intersection_3_1_impl.h>
|
||||||
|
#include <CGAL/Intersections_3/internal/Iso_cuboid_3_Segment_3_do_intersect.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
CGAL_DO_INTERSECT_FUNCTION(Iso_cuboid_3,Segment_3, 3)
|
||||||
|
CGAL_INTERSECTION_FUNCTION(Segment_3, Iso_cuboid_3, 3)
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_3_BBOX_3_SEGMENT_3_H
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_3_ISO_CUBOID_3_SPHERE_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_ISO_CUBOID_3_SPHERE_3_H
|
||||||
|
|
||||||
|
#include <CGAL/Iso_cuboid_3.h>
|
||||||
|
#include <CGAL/Sphere_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_3/internal/Bbox_3_Sphere_3_do_intersect.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
CGAL_DO_INTERSECT_FUNCTION(Iso_cuboid_3, Sphere_3, 3)
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_3_ISO_CUBOID_3_SPHERE_3_H
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_3_ISO_CUBOID_3_TETRAHEDRON_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_ISO_CUBOID_3_TETRAHEDRON_3_H
|
||||||
|
|
||||||
|
#include <CGAL/Iso_cuboid_3.h>
|
||||||
|
#include <CGAL/Tetrahedron_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_3/internal/Tetrahedron_3_Bounded_3_do_intersect.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
CGAL_DO_INTERSECT_FUNCTION(Iso_cuboid_3, Tetrahedron_3, 3)
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_3_ISO_CUBOID_3_TETRAHEDRON_3_H
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_3_ISO_CUBOID_3_TRIANGLE_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_ISO_CUBOID_3_TRIANGLE_3_H
|
||||||
|
|
||||||
|
#include <CGAL/Iso_cuboid_3.h>
|
||||||
|
#include <CGAL/Triangle_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_do_intersect.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
CGAL_DO_INTERSECT_FUNCTION(Iso_cuboid_3,Triangle_3, 3)
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_3_BBOX_3_TRIANGLE_3_H
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
// Copyright (c) 2000
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
// Utrecht University (The Netherlands),
|
// All rights reserved.
|
||||||
// ETH Zurich (Switzerland),
|
|
||||||
// INRIA Sophia-Antipolis (France),
|
|
||||||
// Max-Planck-Institute Saarbruecken (Germany),
|
|
||||||
// and Tel-Aviv University (Israel). All rights reserved.
|
|
||||||
//
|
//
|
||||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public License as
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
|
@ -21,6 +17,19 @@
|
||||||
// SPDX-License-Identifier: LGPL-3.0+
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Geert-Jan Giezeman
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
#include <CGAL/Point_2_Iso_rectangle_2_intersection.h>
|
#ifndef CGAL_INTERSECTIONS_3_LINE_3_LINE_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_LINE_3_LINE_3_H
|
||||||
|
|
||||||
|
#include <CGAL/Line_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_3/internal/intersection_3_1_impl.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
CGAL_INTERSECTION_FUNCTION_SELF(Line_3, 3)
|
||||||
|
CGAL_DO_INTERSECT_FUNCTION_SELF(Line_3, 3)
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_3_LINE_3_LINE_3_H
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_3_LINE_PLANE_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_LINE_PLANE_3_H
|
||||||
|
|
||||||
|
#include <CGAL/Line_3.h>
|
||||||
|
#include <CGAL/Plane_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_3/internal/intersection_3_1_impl.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
CGAL_INTERSECTION_FUNCTION(Plane_3, Line_3, 3)
|
||||||
|
CGAL_DO_INTERSECT_FUNCTION(Plane_3, Line_3, 3)
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_3_LINE_PLANE_3_H
|
||||||
|
|
@ -0,0 +1,83 @@
|
||||||
|
// Copyright (c) 2018 INRIA Sophia-Antipolis (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Maxime Gimeno
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_3_LINE_3_POINT_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_LINE_3_POINT_3_H
|
||||||
|
|
||||||
|
#include <CGAL/Line_3.h>
|
||||||
|
#include <CGAL/Point_3.h>
|
||||||
|
#include <CGAL/Intersection_traits_3.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
|
||||||
|
namespace Intersections {
|
||||||
|
|
||||||
|
namespace internal {
|
||||||
|
|
||||||
|
template <class K>
|
||||||
|
inline bool
|
||||||
|
do_intersect(const typename K::Point_3 &pt,
|
||||||
|
const typename K::Line_3 &line,
|
||||||
|
const K&)
|
||||||
|
{
|
||||||
|
return line.has_on(pt);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class K>
|
||||||
|
inline bool
|
||||||
|
do_intersect(const typename K::Line_3 &line,
|
||||||
|
const typename K::Point_3 &pt,
|
||||||
|
const K&)
|
||||||
|
{
|
||||||
|
return line.has_on(pt);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class K>
|
||||||
|
typename CGAL::Intersection_traits
|
||||||
|
<K, typename K::Point_3, typename K::Line_3>::result_type
|
||||||
|
intersection(const typename K::Point_3 &pt,
|
||||||
|
const typename K::Line_3 &line,
|
||||||
|
const K& k)
|
||||||
|
{
|
||||||
|
if (do_intersect(pt,line,k))
|
||||||
|
return intersection_return<typename K::Intersect_3, typename K::Point_3, typename K::Line_3>(pt);
|
||||||
|
return intersection_return<typename K::Intersect_3, typename K::Point_3, typename K::Line_3>();
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class K>
|
||||||
|
typename CGAL::Intersection_traits
|
||||||
|
<K, typename K::Line_3, typename K::Point_3>::result_type
|
||||||
|
intersection(const typename K::Line_3 &line,
|
||||||
|
const typename K::Point_3 &pt,
|
||||||
|
const K& k)
|
||||||
|
{
|
||||||
|
return internal::intersection(pt, line, k);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace internal
|
||||||
|
} // namespace Intersections
|
||||||
|
|
||||||
|
CGAL_INTERSECTION_FUNCTION(Point_3, Line_3, 3)
|
||||||
|
CGAL_DO_INTERSECT_FUNCTION(Point_3, Line_3, 3)
|
||||||
|
|
||||||
|
} //namespace CGAL
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_3_LINE_3_POINT_3_H
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_3_LINE_3_RAY_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_LINE_3_RAY_3_H
|
||||||
|
|
||||||
|
#include <CGAL/Line_3.h>
|
||||||
|
#include <CGAL/Ray_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_3/internal/intersection_3_1_impl.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
CGAL_INTERSECTION_FUNCTION(Ray_3, Line_3, 3)
|
||||||
|
CGAL_DO_INTERSECT_FUNCTION(Ray_3, Line_3, 3)
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_3_LINE_3_RAY_3_H
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_3_LINE_3_SEGMENT_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_LINE_3_SEGMENT_3_H
|
||||||
|
|
||||||
|
#include <CGAL/Line_3.h>
|
||||||
|
#include <CGAL/Segment_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_3/internal/intersection_3_1_impl.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
CGAL_INTERSECTION_FUNCTION(Line_3, Segment_3, 3)
|
||||||
|
CGAL_DO_INTERSECT_FUNCTION(Line_3, Segment_3, 3)
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_3_LINE_3_SEGMENT_3_H
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_3_LINE_3_SPHERE_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_LINE_3_SPHERE_3_H
|
||||||
|
|
||||||
|
#include <CGAL/Line_3.h>
|
||||||
|
#include <CGAL/Sphere_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_3/internal/Triangle_3_Sphere_3_do_intersect.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
CGAL_DO_INTERSECT_FUNCTION(Line_3, Sphere_3, 3)
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_3_LINE_3_SPHERE_3_H
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_3_LINE_3_TETRAHEDRON_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_LINE_3_TETRAHEDRON_3_H
|
||||||
|
|
||||||
|
#include <CGAL/Line_3.h>
|
||||||
|
#include <CGAL/Tetrahedron_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_3/internal/Tetrahedron_3_Unbounded_3_do_intersect.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
CGAL_DO_INTERSECT_FUNCTION(Line_3, Tetrahedron_3, 3)
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_3_LINE_3_TETRAHEDRON_3_H
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_3_LINE_3_TRIANGLE_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_LINE_3_TRIANGLE_3_H
|
||||||
|
|
||||||
|
#include <CGAL/Line_3.h>
|
||||||
|
#include <CGAL/Triangle_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_3/internal/Triangle_3_Line_3_intersection.h>
|
||||||
|
#include <CGAL/Intersections_3/internal/Triangle_3_Line_3_do_intersect.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
CGAL_INTERSECTION_FUNCTION(Triangle_3, Line_3, 3)
|
||||||
|
CGAL_DO_INTERSECT_FUNCTION(Triangle_3, Line_3, 3)
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_3_LINE_3_TRIANGLE_3_H
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
|
// or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0+
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Sebastien Loriot
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CGAL_INTERSECTIONS_3_PLANE_3_PLANE_3_H
|
||||||
|
#define CGAL_INTERSECTIONS_3_PLANE_3_PLANE_3_H
|
||||||
|
|
||||||
|
#include <CGAL/Plane_3.h>
|
||||||
|
|
||||||
|
#include <CGAL/Intersections_3/internal/intersection_3_1_impl.h>
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
CGAL_INTERSECTION_FUNCTION_SELF(Plane_3, 3)
|
||||||
|
CGAL_DO_INTERSECT_FUNCTION_SELF(Plane_3, 3)
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // CGAL_INTERSECTIONS_3_PLANE_3_PLANE_3_H
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue