mirror of https://github.com/CGAL/cgal
Qualified functions with their namespace so resolve ambiguities for CL and ICL
This commit is contained in:
parent
50e9f84b48
commit
bef72e032a
|
|
@ -1,3 +1,6 @@
|
|||
17 March 2006 Andreas Fabri
|
||||
- Qualified functions with their namespace so resolve ambiguities for CL and ICL
|
||||
|
||||
14 March 2006 Joachim Reichel
|
||||
- Added/fixed CGAL_MAKEFILE= line in makefiles
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ namespace CircularFunctors {
|
|||
result_type
|
||||
operator() ( const typename CK::Circle_2 & c )
|
||||
{
|
||||
return get_equation<CK>(c);
|
||||
return CircularFunctors::get_equation<CK>(c);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ namespace LinearFunctors {
|
|||
result_type
|
||||
operator() ( const typename CK::Line_2 & l )
|
||||
{
|
||||
return get_equation<CK>(l);
|
||||
return LinearFunctors::get_equation<CK>(l);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ namespace CircularFunctors {
|
|||
result_type
|
||||
operator() (const Circular_arc_point_2 &p0,
|
||||
const Circular_arc_point_2 &p1) const
|
||||
{ return compare_x<CK>(p0, p1);}
|
||||
{ return CircularFunctors::compare_x<CK>(p0, p1);}
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ namespace CircularFunctors {
|
|||
result_type
|
||||
operator() (const Circular_arc_point_2 &p0,
|
||||
const Circular_arc_point_2 &p1) const
|
||||
{return compare_y<CK>(p0, p1);}
|
||||
{return CircularFunctors::compare_y<CK>(p0, p1);}
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -91,7 +91,7 @@ namespace CircularFunctors {
|
|||
result_type
|
||||
operator() (const Circular_arc_point_2 &p0,
|
||||
const Circular_arc_point_2 &p1) const
|
||||
{ return compare_xy<CK>(p0, p1);}
|
||||
{ return CircularFunctors::compare_xy<CK>(p0, p1);}
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -108,11 +108,11 @@ namespace CircularFunctors {
|
|||
|
||||
result_type
|
||||
operator()(const Circular_arc_2 &a, const Circular_arc_point_2 &p) const
|
||||
{ return point_in_x_range<CK>(a, p); }
|
||||
{ return CircularFunctors::point_in_x_range<CK>(a, p); }
|
||||
|
||||
result_type
|
||||
operator()(const Line_arc_2 &a, const Circular_arc_point_2 &p) const
|
||||
{ return point_in_x_range<CK>(a, p); }
|
||||
{ return CircularFunctors::point_in_x_range<CK>(a, p); }
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -241,12 +241,12 @@ namespace CircularFunctors {
|
|||
result_type
|
||||
operator() (const Circular_arc_point_2 &p,
|
||||
const Circular_arc_2 &A1) const
|
||||
{ return compare_y_at_x<CK>(p, A1); }
|
||||
{ return CircularFunctors::compare_y_at_x<CK>(p, A1); }
|
||||
|
||||
result_type
|
||||
operator() (const Circular_arc_point_2 &p,
|
||||
const Line_arc_2 &A1) const
|
||||
{ return compare_y_at_x<CK>(p, A1); }
|
||||
{ return CircularFunctors::compare_y_at_x<CK>(p, A1); }
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -262,11 +262,11 @@ namespace CircularFunctors {
|
|||
|
||||
result_type
|
||||
operator() (const Circular_arc_2 &A1, const Circular_arc_2 &A2) const
|
||||
{ return do_overlap<CK>(A1, A2); }
|
||||
{ return CircularFunctors::do_overlap<CK>(A1, A2); }
|
||||
|
||||
result_type
|
||||
operator() (const Line_arc_2 &A1, const Line_arc_2 &A2) const
|
||||
{ return do_overlap<CK>(A1, A2); }
|
||||
{ return CircularFunctors::do_overlap<CK>(A1, A2); }
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -288,7 +288,7 @@ namespace CircularFunctors {
|
|||
{
|
||||
std::vector< std::pair<Object,bool> > vec;
|
||||
|
||||
return make_x_monotone<CK> (A, res);
|
||||
return CircularFunctors::make_x_monotone<CK> (A, res);
|
||||
|
||||
// advanced_make_x_monotone<CK> (A, std::back_inserter(vec));
|
||||
|
||||
|
|
@ -297,7 +297,7 @@ namespace CircularFunctors {
|
|||
|
||||
// return res;
|
||||
|
||||
return make_x_monotone<CK> (A, res);
|
||||
return CircularFunctors::make_x_monotone<CK> (A, res);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -305,7 +305,7 @@ namespace CircularFunctors {
|
|||
OutputIterator
|
||||
operator()(const Line_arc_2 &A, OutputIterator res) const
|
||||
{
|
||||
return make_x_monotone<CK>(A,res);
|
||||
return CircularFunctors::make_x_monotone<CK>(A,res);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
@ -329,7 +329,7 @@ namespace CircularFunctors {
|
|||
typedef std::pair< CGAL::Object, relat_pos> Obj_descr_2;
|
||||
std::vector<Obj_descr_2> vec;
|
||||
|
||||
advanced_make_xy_monotone<CK> (A, std::back_inserter(vec));
|
||||
CircularFunctors::advanced_make_xy_monotone<CK> (A, std::back_inserter(vec));
|
||||
|
||||
for(int i=0;i<vec.size();++i)
|
||||
*res++=vec.at(i).first;
|
||||
|
|
@ -363,7 +363,7 @@ namespace CircularFunctors {
|
|||
template < class OutputIterator >
|
||||
OutputIterator
|
||||
operator()(const Circular_arc_2 &A, OutputIterator res) const
|
||||
{ return advanced_make_x_monotone<CK> (A, res);}
|
||||
{ return CircularFunctors::advanced_make_x_monotone<CK> (A, res);}
|
||||
|
||||
|
||||
// No extra information is meant to be returned for line arcs (should it?)
|
||||
|
|
@ -394,7 +394,7 @@ template < class CK >
|
|||
template < class OutputIterator >
|
||||
OutputIterator
|
||||
operator()(const Circular_arc_2 &A, OutputIterator res) const
|
||||
{ return advanced_make_xy_monotone<CK> (A, res);}
|
||||
{ return CircularFunctors::advanced_make_xy_monotone<CK> (A, res);}
|
||||
|
||||
|
||||
// No extra information is meant to be returned for line arcs (should it?)
|
||||
|
|
@ -430,43 +430,43 @@ template < class CK >
|
|||
template < class OutputIterator >
|
||||
OutputIterator
|
||||
operator()(const Circle & c1, const Circle & c2, OutputIterator res) const
|
||||
{ return intersect_2<CK> (c1,c2,res); }
|
||||
{ return CircularFunctors::intersect_2<CK> (c1,c2,res); }
|
||||
|
||||
template < class OutputIterator >
|
||||
OutputIterator
|
||||
operator()(const Circular_arc & c1, const Circular_arc & c2,
|
||||
OutputIterator res) const
|
||||
{ return intersect_2<CK> (c1,c2,res); }
|
||||
{ return CircularFunctors::intersect_2<CK> (c1,c2,res); }
|
||||
|
||||
template < class OutputIterator >
|
||||
OutputIterator
|
||||
operator()(const Line_arc & c1, const Line_arc & c2,
|
||||
OutputIterator res) const
|
||||
{ return intersect_2<CK> (c1,c2,res); }
|
||||
{ return CircularFunctors::intersect_2<CK> (c1,c2,res); }
|
||||
|
||||
template < class OutputIterator >
|
||||
OutputIterator
|
||||
operator()(const Line_arc & c1, const Circle & c2,
|
||||
OutputIterator res) const
|
||||
{ return intersect_2<CK> (c1,c2,res); }
|
||||
{ return CircularFunctors::intersect_2<CK> (c1,c2,res); }
|
||||
|
||||
template < class OutputIterator >
|
||||
OutputIterator
|
||||
operator()(const Circle & c1, const Line_arc & c2,
|
||||
OutputIterator res) const
|
||||
{ return intersect_2<CK> (c2,c1,res); }
|
||||
{ return CircularFunctors::intersect_2<CK> (c2,c1,res); }
|
||||
|
||||
template < class OutputIterator >
|
||||
OutputIterator
|
||||
operator()(const Line_arc & c1, const Circular_arc & c2,
|
||||
OutputIterator res) const
|
||||
{ return intersect_2<CK> (c1,c2,res); }
|
||||
{ return CircularFunctors::intersect_2<CK> (c1,c2,res); }
|
||||
|
||||
template < class OutputIterator >
|
||||
OutputIterator
|
||||
operator()(const Circular_arc & c1, const Line_arc & c2,
|
||||
OutputIterator res) const
|
||||
{ return intersect_2<CK> (c2,c1,res); }
|
||||
{ return CircularFunctors::intersect_2<CK> (c2,c1,res); }
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -487,14 +487,14 @@ template < class CK >
|
|||
operator()(const Circular_arc_2 &A,
|
||||
const Circular_arc_point_2 &p,
|
||||
Circular_arc_2 &ca1, Circular_arc_2 &ca2) const
|
||||
{ return split<CK>(A, p, ca1, ca2); }
|
||||
{ return CircularFunctors::split<CK>(A, p, ca1, ca2); }
|
||||
|
||||
|
||||
result_type
|
||||
operator()(const Line_arc_2 &A,
|
||||
const Circular_arc_point_2 &p,
|
||||
Line_arc_2 &ca1, Line_arc_2 &ca2) const
|
||||
{ return split<CK>(A, p, ca1, ca2); }
|
||||
{ return CircularFunctors::split<CK>(A, p, ca1, ca2); }
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -514,11 +514,11 @@ template < class CK >
|
|||
|
||||
result_type
|
||||
operator()(const Circular_arc_2 &A) const
|
||||
{ return is_vertical<CK>(A); }
|
||||
{ return CircularFunctors::is_vertical<CK>(A); }
|
||||
|
||||
result_type
|
||||
operator()(const Line_arc_2 &A) const
|
||||
{ return is_vertical<CK>(A); }
|
||||
{ return CircularFunctors::is_vertical<CK>(A); }
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ namespace CircularFunctors {
|
|||
{
|
||||
typedef typename CK::Algebraic_kernel AK;
|
||||
typedef typename CK::Polynomial_for_circles_2_2 Polynomial_for_circles_2_2;
|
||||
Polynomial_for_circles_2_2 equation = get_equation<CK>(a);
|
||||
Polynomial_for_circles_2_2 equation = CircularFunctors::get_equation<CK>(a);
|
||||
|
||||
return (AK().sign_at_object()(equation,p.coordinates()) == ZERO);
|
||||
}
|
||||
|
|
@ -104,8 +104,8 @@ namespace CircularFunctors {
|
|||
typedef typename CK::Algebraic_kernel AK;
|
||||
typedef typename CK::Polynomial_for_circles_2_2 Equation;
|
||||
typedef typename CK::Root_for_circles_2_2 Root_for_circles_2_2;
|
||||
Equation e1 = get_equation<CK>(c1);
|
||||
Equation e2 = get_equation<CK>(c2);
|
||||
Equation e1 = CircularFunctors::get_equation<CK>(c1);
|
||||
Equation e2 = CircularFunctors::get_equation<CK>(c2);
|
||||
|
||||
if (e1 == e2) {
|
||||
*res++ = make_object(e1);
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ namespace CircularFunctors {
|
|||
{
|
||||
CGAL_kernel_precondition (A.is_x_monotone());
|
||||
// range includes endpoints here
|
||||
return compare_x<CK>( p, A.source()) != compare_x<CK>(p, A.target() );
|
||||
return CircularFunctors::compare_x<CK>( p, A.source()) != CircularFunctors::compare_x<CK>(p, A.target() );
|
||||
}
|
||||
|
||||
template < class CK >
|
||||
|
|
@ -137,7 +137,7 @@ namespace CircularFunctors {
|
|||
const typename CK::Circular_arc_2 &A1)
|
||||
{
|
||||
CGAL_kernel_precondition (A1.is_x_monotone());
|
||||
CGAL_kernel_precondition (point_in_x_range<CK>(A1, p));
|
||||
CGAL_kernel_precondition (CircularFunctors::point_in_x_range<CK>(A1, p));
|
||||
|
||||
// Compare the ordinate of p with the ordinate of the center.
|
||||
Comparison_result sgn =
|
||||
|
|
@ -273,7 +273,7 @@ namespace CircularFunctors {
|
|||
equal(const typename CK::Circular_arc_point_2 &p0,
|
||||
const typename CK::Circular_arc_point_2 &p1)
|
||||
{
|
||||
return compare_xy<CK>(p0, p1) == 0;
|
||||
return CircularFunctors::compare_xy<CK>(p0, p1) == 0;
|
||||
}
|
||||
|
||||
template < class CK >
|
||||
|
|
@ -285,8 +285,8 @@ namespace CircularFunctors {
|
|||
(A1.supporting_circle() != A2.supporting_circle().opposite()))
|
||||
return false;
|
||||
|
||||
return (equal<CK>(A1.source(), A2.source()) &&
|
||||
equal<CK>(A1.target(), A2.target()));
|
||||
return (CircularFunctors::equal<CK>(A1.source(), A2.source()) &&
|
||||
CircularFunctors::equal<CK>(A1.target(), A2.target()));
|
||||
}
|
||||
|
||||
// template < class CK >
|
||||
|
|
@ -318,8 +318,8 @@ namespace CircularFunctors {
|
|||
|
||||
if ( A1.on_upper_part() != A2.on_upper_part() ) return false;
|
||||
|
||||
return compare_x<CK>(A1.right(), A2.left()) > 0
|
||||
&& compare_x<CK>(A1.left(), A2.right()) < 0;
|
||||
return CircularFunctors::compare_x<CK>(A1.right(), A2.left()) > 0
|
||||
&& CircularFunctors::compare_x<CK>(A1.left(), A2.right()) < 0;
|
||||
}
|
||||
|
||||
// Small accessory function
|
||||
|
|
@ -340,10 +340,10 @@ namespace CircularFunctors {
|
|||
// (equation,p.coordinates())!= ZERO)
|
||||
// return false;
|
||||
|
||||
if ( ! has_on<CK>(a.supporting_circle(),p) )
|
||||
if ( ! CircularFunctors::has_on<CK>(a.supporting_circle(),p) )
|
||||
return false;
|
||||
|
||||
if (! point_in_x_range<CK>(a, p) )
|
||||
if (! CircularFunctors::point_in_x_range<CK>(a, p) )
|
||||
return false;
|
||||
|
||||
int cmp = CGAL::compare(p.y(), a.supporting_circle().center().y());
|
||||
|
|
@ -361,17 +361,17 @@ namespace CircularFunctors {
|
|||
typename CK::Circular_arc_2 &ca2)
|
||||
{
|
||||
CGAL_kernel_precondition( A.is_x_monotone() );
|
||||
CGAL_kernel_precondition( point_in_x_range<CK>( A, p ) );
|
||||
CGAL_kernel_precondition( CircularFunctors::point_in_x_range<CK>( A, p ) );
|
||||
CGAL_kernel_precondition( A.on_upper_part() == (p.y() >
|
||||
A.supporting_circle().center().y()) );
|
||||
CGAL_kernel_precondition( has_on<CK>(A, p) );
|
||||
CGAL_kernel_precondition( CircularFunctors::has_on<CK>(A, p) );
|
||||
|
||||
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
||||
|
||||
ca1 = Circular_arc_2( A.supporting_circle(), A.source(), p);
|
||||
ca2 = Circular_arc_2( A.supporting_circle(), p, A.target());
|
||||
//if ( ca1.right()!=ca2.left() )
|
||||
if ( compare_x<CK>(ca1.left(), ca2.left()) != SMALLER )
|
||||
if ( CircularFunctors::compare_x<CK>(ca1.left(), ca2.left()) != SMALLER )
|
||||
{
|
||||
//std::cout << " SWAP " << std::endl;
|
||||
std::swap(ca1,ca2);
|
||||
|
|
@ -395,8 +395,8 @@ namespace CircularFunctors {
|
|||
if ( (a1.supporting_circle() == a2.supporting_circle()) ||
|
||||
(a1.supporting_circle() == a2.supporting_circle().opposite()) ) {
|
||||
// The ranges need to overlap in order for the curves to overlap.
|
||||
if (compare_x<CK>(a1.left(), a2.right()) > 0 ||
|
||||
compare_x<CK>(a2.left(), a1.right()) > 0)
|
||||
if ( CircularFunctors::compare_x<CK>(a1.left(), a2.right()) > 0 ||
|
||||
CircularFunctors::compare_x<CK>(a2.left(), a1.right()) > 0)
|
||||
return res;
|
||||
|
||||
// They both need to be on the same upper/lower part.
|
||||
|
|
@ -415,15 +415,15 @@ namespace CircularFunctors {
|
|||
// TODO : We should use std::max and std::min, but they
|
||||
// require less_x_2.
|
||||
const Circular_arc_2 & arctmp =
|
||||
compare_x<CK>(a1.right(), a2.right()) < 0 ? a1 : a2;
|
||||
CircularFunctors::compare_x<CK>(a1.right(), a2.right()) < 0 ? a1 : a2;
|
||||
// we know that the right endpoint is correct, let us look for
|
||||
// the left now:
|
||||
|
||||
|
||||
//? a1.left() : a2.left();
|
||||
if (compare_x<CK>(a1.left(), a2.left()) > 0) {
|
||||
if (CircularFunctors::compare_x<CK>(a1.left(), a2.left()) > 0) {
|
||||
//the left endpoint is a1's
|
||||
if (compare_x<CK>(a1.left(), a2.right()) < 0){
|
||||
if (CircularFunctors::compare_x<CK>(a1.left(), a2.right()) < 0){
|
||||
if (a1.on_upper_part()) {
|
||||
const Circular_arc_2 & arc =
|
||||
Circular_arc_2(a1.supporting_circle(),a2.right(),a1.left());
|
||||
|
|
@ -440,9 +440,9 @@ namespace CircularFunctors {
|
|||
else
|
||||
*res++ = make_object(std::make_pair(arctmp.right(),1u));
|
||||
}
|
||||
else if( compare_x<CK>(a1.left(), a2.left()) < 0 ) {
|
||||
else if( CircularFunctors::compare_x<CK>(a1.left(), a2.left()) < 0 ) {
|
||||
//the left endpoint is a2's
|
||||
if(compare_x<CK>(a1.right(), a2.left()) > 0) {
|
||||
if(CircularFunctors::compare_x<CK>(a1.right(), a2.left()) > 0) {
|
||||
if(a1.on_upper_part()){
|
||||
const Circular_arc_2 & arc =
|
||||
Circular_arc_2(a1.supporting_circle(), a1.right(), a2.left());
|
||||
|
|
@ -460,9 +460,9 @@ namespace CircularFunctors {
|
|||
*res++ = make_object(std::make_pair(arctmp.right(),1u));
|
||||
}
|
||||
else {
|
||||
if(compare_x<CK>(a1.right(), a2.right()) >= 0)
|
||||
if(CircularFunctors::compare_x<CK>(a1.right(), a2.right()) >= 0)
|
||||
*res++ = make_object(a2);
|
||||
else if(compare_x<CK>(a1.right(), a2.right()) < 0)
|
||||
else if(CircularFunctors::compare_x<CK>(a1.right(), a2.right()) < 0)
|
||||
*res++ = make_object(a1);
|
||||
else
|
||||
*res++ = make_object(std::make_pair(arctmp.right(),1u));
|
||||
|
|
@ -491,7 +491,7 @@ namespace CircularFunctors {
|
|||
(CGAL::object_cast< std::pair<Circular_arc_point_2, unsigned> >
|
||||
(&(intersection_points[0])))->first;
|
||||
if (intersection_points.size() < 2){// multiplicity 2
|
||||
if (has_on<CK>(a1, left) && has_on<CK>(a2, left))
|
||||
if (CircularFunctors::has_on<CK>(a1, left) && CircularFunctors::has_on<CK>(a2, left))
|
||||
*res++ = make_object(std::make_pair(left,2u));
|
||||
}
|
||||
else {// multiplicity 1
|
||||
|
|
@ -499,9 +499,9 @@ namespace CircularFunctors {
|
|||
(CGAL::object_cast< std::pair<Circular_arc_point_2, unsigned> >
|
||||
(&(intersection_points[1])))->first;
|
||||
// We also need to check that these intersection points are on the arc.
|
||||
if (has_on<CK>(a1, left) && has_on<CK>(a2, left))
|
||||
if (CircularFunctors::has_on<CK>(a1, left) && CircularFunctors::has_on<CK>(a2, left))
|
||||
*res++ = make_object(std::make_pair(left,1u));
|
||||
if (has_on<CK>(a1, right) && has_on<CK>(a2, right))
|
||||
if (CircularFunctors::has_on<CK>(a1, right) && CircularFunctors::has_on<CK>(a2, right))
|
||||
*res++ = make_object(std::make_pair(right,1u));
|
||||
}
|
||||
return res;
|
||||
|
|
@ -529,7 +529,7 @@ namespace CircularFunctors {
|
|||
const Circular_arc_2 *a2_aux =
|
||||
CGAL::object_cast<Circular_arc_2>(&*it2);
|
||||
std::vector< CGAL::Object > res_aux;
|
||||
intersect_2<CK>( *a1_aux, *a2_aux, std::back_inserter(res_aux));
|
||||
CircularFunctors::intersect_2<CK>( *a1_aux, *a2_aux, std::back_inserter(res_aux));
|
||||
if(res_aux.size() == 2){
|
||||
//it can't be a circular_arc_2
|
||||
//CGAL_kernel_assertion(assign(the_pair, res_aux[0]));
|
||||
|
|
@ -635,7 +635,7 @@ namespace CircularFunctors {
|
|||
= circle_arcs.begin();
|
||||
it2 != circle_arcs.end(); ++it2 )
|
||||
{
|
||||
if (has_on<CK>(*it2, *it1)) {
|
||||
if (CircularFunctors::has_on<CK>(*it2, *it1)) {
|
||||
other_point = false;
|
||||
break;
|
||||
}
|
||||
|
|
@ -712,11 +712,10 @@ namespace CircularFunctors {
|
|||
// in the 2 vertical tangent points
|
||||
|
||||
std::vector< Root_for_circles_2_2 > vector_x_extremal_points;
|
||||
x_extremal_points<CK>(A.supporting_circle(),
|
||||
CircularFunctors::x_extremal_points<CK>(A.supporting_circle(),
|
||||
std::back_inserter(vector_x_extremal_points));
|
||||
Circular_arc_point_2 x_extremal_point1 = vector_x_extremal_points[0];
|
||||
Circular_arc_point_2 x_extremal_point2 = vector_x_extremal_points[1];
|
||||
|
||||
if (cmp_begin > 0) {
|
||||
*res++ = make_object(Circular_arc_2 (A.supporting_circle(),
|
||||
A.source(),
|
||||
|
|
@ -834,7 +833,7 @@ namespace CircularFunctors {
|
|||
|
||||
*res++ = S_pair
|
||||
(make_object(Circular_arc_2(A.supporting_circle(), A.source(),
|
||||
x_extremal_point<CK>
|
||||
CircularFunctors::x_extremal_point<CK>
|
||||
(A.supporting_circle(),true))),
|
||||
true);
|
||||
|
||||
|
|
@ -842,22 +841,22 @@ namespace CircularFunctors {
|
|||
// We must cut in 3 parts.
|
||||
*res++ = std::make_pair
|
||||
(make_object(Circular_arc_2 (A.supporting_circle(),
|
||||
x_extremal_point<CK>
|
||||
CircularFunctors::x_extremal_point<CK>
|
||||
(A.supporting_circle(),true),
|
||||
x_extremal_point<CK>
|
||||
CircularFunctors::x_extremal_point<CK>
|
||||
(A.supporting_circle(),false))),
|
||||
false);
|
||||
|
||||
*res++ = std::make_pair
|
||||
(make_object(Circular_arc_2 (A.supporting_circle(),
|
||||
x_extremal_point<CK>
|
||||
CircularFunctors::x_extremal_point<CK>
|
||||
(A.supporting_circle(),false),
|
||||
A.target())),
|
||||
true);
|
||||
} else {
|
||||
*res++ = std::make_pair
|
||||
(make_object(Circular_arc_2 (A.supporting_circle(),
|
||||
x_extremal_point<CK>
|
||||
CircularFunctors::x_extremal_point<CK>
|
||||
(A.supporting_circle(),true),
|
||||
A.target())),
|
||||
false);
|
||||
|
|
@ -868,7 +867,7 @@ namespace CircularFunctors {
|
|||
*res++ = std::make_pair
|
||||
(make_object(Circular_arc_2 (A.supporting_circle(),
|
||||
A.source(),
|
||||
x_extremal_point<CK>
|
||||
CircularFunctors::x_extremal_point<CK>
|
||||
(A.supporting_circle(),false))),
|
||||
false);
|
||||
|
||||
|
|
@ -876,22 +875,22 @@ namespace CircularFunctors {
|
|||
// We must cut in 3 parts.
|
||||
*res++ = std::make_pair
|
||||
(make_object(Circular_arc_2 (A.supporting_circle(),
|
||||
x_extremal_point<CK>
|
||||
CircularFunctors::x_extremal_point<CK>
|
||||
(A.supporting_circle(),false),
|
||||
x_extremal_point<CK>
|
||||
CircularFunctors::x_extremal_point<CK>
|
||||
(A.supporting_circle(),true))) ,
|
||||
true );
|
||||
|
||||
*res++ = std::make_pair
|
||||
(make_object(Circular_arc_2 (A.supporting_circle(),
|
||||
x_extremal_point<CK>
|
||||
CircularFunctors::x_extremal_point<CK>
|
||||
(A.supporting_circle(),true),
|
||||
A.target())),
|
||||
false);
|
||||
} else {
|
||||
*res++ = std::make_pair
|
||||
(make_object(Circular_arc_2 (A.supporting_circle(),
|
||||
x_extremal_point<CK>
|
||||
CircularFunctors::x_extremal_point<CK>
|
||||
(A.supporting_circle(),false),
|
||||
A.target())),
|
||||
true);
|
||||
|
|
@ -903,13 +902,13 @@ namespace CircularFunctors {
|
|||
*res++ = std::make_pair
|
||||
(make_object(Circular_arc_2 (A.supporting_circle(),
|
||||
A.source(),
|
||||
x_extremal_point<CK>
|
||||
CircularFunctors::x_extremal_point<CK>
|
||||
(A.supporting_circle(),false))),
|
||||
false);
|
||||
|
||||
*res++ = std::make_pair
|
||||
(make_object(Circular_arc_2 (A.supporting_circle(),
|
||||
x_extremal_point<CK>
|
||||
CircularFunctors::x_extremal_point<CK>
|
||||
(A.supporting_circle(),false),
|
||||
A.target())),
|
||||
true);
|
||||
|
|
@ -920,13 +919,13 @@ namespace CircularFunctors {
|
|||
*res++ = std::make_pair
|
||||
(make_object(Circular_arc_2 (A.supporting_circle(),
|
||||
A.source(),
|
||||
x_extremal_point<CK>
|
||||
CircularFunctors::x_extremal_point<CK>
|
||||
(A.supporting_circle(),true))),
|
||||
true);
|
||||
|
||||
*res++ = std::make_pair
|
||||
(make_object(Circular_arc_2 (A.supporting_circle(),
|
||||
x_extremal_point<CK>
|
||||
CircularFunctors::x_extremal_point<CK>
|
||||
(A.supporting_circle(),true),
|
||||
A.target())),
|
||||
false);
|
||||
|
|
@ -992,7 +991,7 @@ advanced_make_xy_monotone( const typename CK::Circular_arc_2 &a,
|
|||
|
||||
tmp1.first = make_object
|
||||
(Circular_arc_2(a.supporting_circle(),tmp_arc->source(),
|
||||
y_extremal_point<CK>
|
||||
CircularFunctors::y_extremal_point<CK>
|
||||
(a.supporting_circle(),!tmp.second)));
|
||||
|
||||
tmp1.second.first=tmp.second;
|
||||
|
|
@ -1000,7 +999,7 @@ advanced_make_xy_monotone( const typename CK::Circular_arc_2 &a,
|
|||
|
||||
tmp2.first = make_object
|
||||
(Circular_arc_2(a.supporting_circle(),
|
||||
y_extremal_point<CK>
|
||||
CircularFunctors::y_extremal_point<CK>
|
||||
(a.supporting_circle(),!tmp.second),
|
||||
tmp_arc->target()));
|
||||
|
||||
|
|
@ -1040,10 +1039,10 @@ advanced_make_xy_monotone( const typename CK::Circular_arc_2 &a,
|
|||
double ymin = (is_on_upper) ?
|
||||
CGAL::min(left_bb.ymin(),right_bb.ymin()) :
|
||||
to_interval
|
||||
( y_extremal_point<CK>(a.supporting_circle(),true).y()).first;
|
||||
( CircularFunctors::y_extremal_point<CK>(a.supporting_circle(),true).y()).first;
|
||||
double ymax = (is_on_upper) ?
|
||||
to_interval
|
||||
( y_extremal_point<CK>(a.supporting_circle(),false).y() ).second :
|
||||
( CircularFunctors::y_extremal_point<CK>(a.supporting_circle(),false).y() ).second :
|
||||
CGAL::max(left_bb.ymax(),right_bb.ymax());
|
||||
|
||||
return Bbox_2(left_bb.xmin(),ymin,right_bb.xmax(),ymax);
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ namespace LinearFunctors {
|
|||
typedef typename CK::Polynomial_for_circles_2_2 Equation_circle;
|
||||
typedef typename CK::Root_for_circles_2_2 Root_for_circles_2_2;
|
||||
|
||||
Equation_line e1 = get_equation<CK>(l);
|
||||
Equation_line e1 = CGAL::get_equation<CK>(l);
|
||||
Equation_circle e2 = CGAL::get_equation<CK>(c);
|
||||
|
||||
typedef std::vector< std::pair < Root_for_circles_2_2, unsigned > >
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ namespace CircularFunctors {
|
|||
const typename CK::Circular_arc_point_2 &p)
|
||||
{
|
||||
// range includes endpoints here
|
||||
return ( (compare_x<CK>(p, A.source()) != compare_x<CK>(p, A.target()))
|
||||
|| (compare_x(p, A.source()) == CGAL::EQUAL) );
|
||||
return ( (CircularFunctors::compare_x<CK>(p, A.source()) != CircularFunctors::compare_x<CK>(p, A.target()))
|
||||
|| (CircularFunctors::compare_x<CK>(p, A.source()) == CGAL::EQUAL) );
|
||||
}
|
||||
|
||||
template < class CK >
|
||||
|
|
@ -64,8 +64,8 @@ namespace CircularFunctors {
|
|||
(A1.supporting_line() != A2.supporting_line().opposite()))
|
||||
return false;
|
||||
|
||||
return compare_xy<CK>(A1.right(), A2.left()) > 0
|
||||
&& compare_xy<CK>(A1.left(), A2.right()) < 0;
|
||||
return CircularFunctors::compare_xy<CK>(A1.right(), A2.left()) > 0
|
||||
&& CircularFunctors::compare_xy<CK>(A1.left(), A2.right()) < 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ namespace CircularFunctors {
|
|||
if ( ! CGAL::LinearFunctors::has_on<CK>(a.supporting_line(),p) )
|
||||
return false;
|
||||
|
||||
return (compare_xy<CK>(p, a.source()) != compare_xy<CK>(p, a.target()));
|
||||
return (CircularFunctors::compare_xy<CK>(p, a.source()) != CircularFunctors::compare_xy<CK>(p, a.target()));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -107,9 +107,9 @@ namespace CircularFunctors {
|
|||
compare_y_at_x(const typename CK::Circular_arc_point_2 &p,
|
||||
const typename CK::Line_arc_2 &A1)
|
||||
{
|
||||
CGAL_kernel_precondition (point_in_x_range<CK>(A1, p));
|
||||
CGAL_kernel_precondition (CircularFunctors::point_in_x_range<CK>(A1, p));
|
||||
//vertical case
|
||||
if (is_vertical<CK>(A1)) {
|
||||
if (CircularFunctors::is_vertical<CK>(A1)) {
|
||||
if (p.y() <= A1.right().y()) {
|
||||
if(A1.left().y() <= p.y()) {
|
||||
return CGAL::EQUAL;
|
||||
|
|
@ -273,7 +273,7 @@ namespace CircularFunctors {
|
|||
ca1 = Line_arc_2( A.supporting_line(), A.source(), p);
|
||||
ca2 = Line_arc_2( A.supporting_line(), p, A.target());
|
||||
|
||||
if ( compare_xy<CK>(ca1.left(), ca2.left()) != SMALLER )
|
||||
if ( CircularFunctors::compare_xy<CK>(ca1.left(), ca2.left()) != SMALLER )
|
||||
{
|
||||
std::swap(ca1,ca2);
|
||||
}
|
||||
|
|
@ -338,10 +338,10 @@ namespace CircularFunctors {
|
|||
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())));
|
||||
|
||||
if ((compare_xy<CK>(intersect_point, a1.source()) !=
|
||||
compare_xy<CK>(intersect_point, a1.target())) &&
|
||||
(compare_xy<CK>(intersect_point, a2.source()) !=
|
||||
compare_xy<CK>(intersect_point, a2.target())))
|
||||
if ((CircularFunctors::compare_xy<CK>(intersect_point, a1.source()) !=
|
||||
CircularFunctors::compare_xy<CK>(intersect_point, a1.target())) &&
|
||||
(CircularFunctors::compare_xy<CK>(intersect_point, a2.source()) !=
|
||||
CircularFunctors::compare_xy<CK>(intersect_point, a2.target())))
|
||||
*res++ = make_object(std::make_pair(intersect_point, 1u));
|
||||
|
||||
return res;
|
||||
|
|
|
|||
Loading…
Reference in New Issue