mirror of https://github.com/CGAL/cgal
Fixed some predicates
-- traits must have Construct_point_2/3 now -- renamed power_test to satisfy the new convention
This commit is contained in:
parent
c3115389e2
commit
79f5ca0244
|
|
@ -343,6 +343,45 @@ public:
|
|||
return Compare_x_1(rep_, sp, rep_->kinetic_kernel().compare_x_1_object());
|
||||
}
|
||||
|
||||
struct Construct_point_2
|
||||
{
|
||||
template<typename>
|
||||
struct result {
|
||||
typedef Point_2 type;
|
||||
};
|
||||
|
||||
template<typename F>
|
||||
struct result<F(Point_2)> {
|
||||
typedef const Point_2& type;
|
||||
};
|
||||
|
||||
const Point_2& operator()(const Point_2& p) const { return p; }
|
||||
};
|
||||
|
||||
struct Construct_point_3
|
||||
{
|
||||
template<typename>
|
||||
struct result {
|
||||
typedef Point_3 type;
|
||||
};
|
||||
|
||||
template<typename F>
|
||||
struct result<F(Weighted_point_3)> {
|
||||
typedef const Point_3& type;
|
||||
};
|
||||
|
||||
template<typename F>
|
||||
struct result<F(Point_3)> {
|
||||
typedef const Point_3& type;
|
||||
};
|
||||
|
||||
const Point_3& operator()(const Point_3& p) const { return p; }
|
||||
Point_3 operator()(const Weighted_point_3& wp) const { return Point_3(wp.index()); }
|
||||
};
|
||||
|
||||
Construct_point_2 construct_point_2_object() const { return Construct_point_2(); }
|
||||
Construct_point_3 construct_point_3_object() const { return Construct_point_3(); }
|
||||
|
||||
CGAL_MSA(Side_of_oriented_circle,side_of_oriented_circle, Point_2, 2);
|
||||
CGAL_MSA(Orientation,orientation, Point_2, 2);
|
||||
CGAL_MSA(Compare_x, compare_x, Point_2, 2);
|
||||
|
|
@ -363,10 +402,9 @@ public:
|
|||
CGAL_MSA(Less_z, less_z, Point_3, 3);*/
|
||||
CGAL_MSA(Coplanar_orientation, coplanar_orientation, Point_3, 3);
|
||||
CGAL_MSA(Coplanar_side_of_bounded_circle, coplanar_side_of_bounded_circle, Point_3, 3);
|
||||
//CGAL_MSA(Power_test,power_test, Weighted_point_3, 3);
|
||||
CGAL_MSA(Equal, equal, Point_3, 3);
|
||||
CGAL_MSA(Power_side_of_oriented_power_sphere,power_side_of_oriented_power_sphere, Weighted_point_3, 3);
|
||||
|
||||
|
||||
|
||||
CGAL_TSO(Segment_3);
|
||||
CGAL_TSO(Triangle_3);
|
||||
CGAL_TSO(Tetrahedron_3);
|
||||
|
|
|
|||
|
|
@ -97,18 +97,12 @@ public:
|
|||
/*!
|
||||
Takes 4 Point_3.
|
||||
*/
|
||||
typedef Certificate_generator<This, Cartesian_weighted_orientation_3<This> > Orientation_3;
|
||||
typedef Certificate_generator<This, Cartesian_orientation_3<This> > Orientation_3;
|
||||
Orientation_3 orientation_3_object() const
|
||||
{
|
||||
return Orientation_3(k_);
|
||||
}
|
||||
|
||||
/*typedef Cartesian_orientation_3<This> Orientation_3;
|
||||
Orientation_3 orientation_3_object() const
|
||||
{
|
||||
return Orientation_3(k_);
|
||||
}*/
|
||||
|
||||
//! The in_circle test.
|
||||
typedef Certificate_generator<This, Cartesian_side_of_oriented_circle_2<This> > Side_of_oriented_circle_2;
|
||||
Side_of_oriented_circle_2 side_of_oriented_circle_2_object() const
|
||||
|
|
@ -124,7 +118,7 @@ public:
|
|||
}
|
||||
|
||||
//! The power test for weighted points.
|
||||
typedef Certificate_generator<This, Cartesian_power_test_3<This> > Power_side_of_oriented_power_sphere_3;
|
||||
typedef Certificate_generator<This, Cartesian_power_side_of_oriented_power_sphere_3<This> > Power_side_of_oriented_power_sphere_3;
|
||||
Power_side_of_oriented_power_sphere_3 power_side_of_oriented_power_sphere_3_object() const
|
||||
{
|
||||
return Power_side_of_oriented_power_sphere_3(k_);
|
||||
|
|
@ -137,12 +131,6 @@ public:
|
|||
return Weighted_orientation_3(k_);
|
||||
}
|
||||
|
||||
/*typedef Cartesian_weighted_orientation_3<This> Weighted_orientation_3;
|
||||
Weighted_orientation_3 weighted_orientation_3_object() const
|
||||
{
|
||||
return Weighted_orientation_3();
|
||||
}*/
|
||||
|
||||
template <class Arg>
|
||||
struct Null_generator {
|
||||
typedef Arg argument_type;
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ struct Cartesian_side_of_oriented_sphere_3
|
|||
};
|
||||
|
||||
template <class KK>
|
||||
struct Cartesian_power_test_3
|
||||
struct Cartesian_power_side_of_oriented_power_sphere_3
|
||||
{
|
||||
typedef typename KK::Certificate_function result_type;
|
||||
typedef typename KK::Weighted_point_3 first_argument_type;
|
||||
|
|
@ -96,7 +96,9 @@ struct Cartesian_power_test_3
|
|||
typedef typename KK::Weighted_point_3 third_argument_type;
|
||||
typedef typename KK::Weighted_point_3 fourth_argument_type;
|
||||
typedef typename KK::Weighted_point_3 fifth_argument_type;
|
||||
Cartesian_power_test_3(){}
|
||||
|
||||
Cartesian_power_side_of_oriented_power_sphere_3(){}
|
||||
|
||||
result_type operator()(const first_argument_type &a,
|
||||
const second_argument_type &b,
|
||||
const third_argument_type &c,
|
||||
|
|
|
|||
Loading…
Reference in New Issue