bitrot in Kernel_[23]_interface

This commit is contained in:
Marc Glisse 2021-02-14 01:16:52 +01:00
parent 0dcff365d0
commit cf54055b82
3 changed files with 9 additions and 5 deletions

View File

@ -50,7 +50,7 @@ template<class R_,class Zero_> struct Construct_LA_vector
// Makes no sense for an unknown dimension.
return typename Constructor::Dimension()(this->kernel().dimension());
}
result_type operator()(result_type const& v)const{
result_type const& operator()(result_type const& v)const{
return v;
}
result_type operator()(result_type&& v)const{

View File

@ -79,10 +79,11 @@ template <class Base_> struct Kernel_2_interface : public Base_ {
Side_of_oriented_circle_2(Kernel const&k):sos(k){}
result_type operator()(Point_2 const&a, Point_2 const&b, Point_2 const&c, Point_2 const&d) {
//return sos(a,b,c,d);
Point_2 const* t[4]={&a,&b,&c,&d};
return sos(make_transforming_iterator<Dereference_functor>(t+0),make_transforming_iterator<Dereference_functor>(t+4));
Point_2 const* t[4]={&a,&b,&c};
return sos(make_transforming_iterator<Dereference_functor>(t+0),make_transforming_iterator<Dereference_functor>(t+3), d);
}
};
typedef typename Get_functor<Base, Construct_ttag<Point_tag> >::type Construct_point_2;
Less_x_2 less_x_2_object()const{ return Less_x_2(*this); }
Less_y_2 less_y_2_object()const{ return Less_y_2(*this); }
Compare_x_2 compare_x_2_object()const{ return Compare_x_2(*this); }
@ -90,6 +91,7 @@ template <class Base_> struct Kernel_2_interface : public Base_ {
Compare_distance_2 compare_distance_2_object()const{ return Compare_distance_2(*this); }
Orientation_2 orientation_2_object()const{ return Orientation_2(*this); }
Side_of_oriented_circle_2 side_of_oriented_circle_2_object()const{ return Side_of_oriented_circle_2(*this); }
Construct_point_2 construct_point_2_object()const{ return Construct_point_2(*this); }
};
}

View File

@ -76,10 +76,11 @@ template <class Base_> struct Kernel_3_interface : public Base_ {
Side_of_oriented_sphere_3(Kernel const&k):sos(k){}
result_type operator()(Point_3 const&a, Point_3 const&b, Point_3 const&c, Point_3 const&d, Point_3 const&e) {
//return sos(a,b,c,d);
Point_3 const* t[5]={&a,&b,&c,&d,&e};
return sos(make_transforming_iterator<Dereference_functor>(t+0),make_transforming_iterator<Dereference_functor>(t+5));
Point_3 const* t[5]={&a,&b,&c,&d};
return sos(make_transforming_iterator<Dereference_functor>(t+0),make_transforming_iterator<Dereference_functor>(t+4),e);
}
};
typedef typename Get_functor<Base, Construct_ttag<Point_tag> >::type Construct_point_3;
// I don't have the Coplanar predicates (yet)
@ -88,6 +89,7 @@ template <class Base_> struct Kernel_3_interface : public Base_ {
Compare_distance_3 compare_distance_3_object()const{ return Compare_distance_3(*this); }
Orientation_3 orientation_3_object()const{ return Orientation_3(*this); }
Side_of_oriented_sphere_3 side_of_oriented_sphere_3_object()const{ return Side_of_oriented_sphere_3(*this); }
Construct_point_3 construct_point_3_object()const{ return Construct_point_3(*this); }
};
}