Fixed (wrongly) assuming that traits define Bare_point / Weighted_point

This commit is contained in:
Mael Rouxel-Labbé 2017-04-14 11:52:28 +02:00
parent 117ca879d2
commit 3dcb8918a9
1 changed files with 22 additions and 22 deletions

View File

@ -39,16 +39,16 @@ class Side_of_mixed_cell_3
{ {
public: public:
typedef typename K::FT FT; typedef typename K::FT FT;
typedef typename K::Bare_point Bare_point; typedef typename K::Point_3 Point_3;
typedef typename K::Weighted_point Weighted_point; typedef typename K::Weighted_point_3 Weighted_point_3;
typedef CGAL::Sign result_type; typedef CGAL::Sign result_type;
Side_of_mixed_cell_3(const FT &shrink) : s(shrink) { } Side_of_mixed_cell_3(const FT &shrink) : s(shrink) { }
result_type operator()(const Weighted_point &p1, result_type operator()(const Weighted_point_3 &p1,
const Weighted_point &p2, const Weighted_point_3 &p2,
const Bare_point &x) const const Point_3 &x) const
{ {
return side_of_mixed_cellC3(p1.x(),p1.y(),p1.z(),p1.weight(), return side_of_mixed_cellC3(p1.x(),p1.y(),p1.z(),p1.weight(),
p2.x(),p2.y(),p2.z(),p2.weight(), p2.x(),p2.y(),p2.z(),p2.weight(),
@ -56,10 +56,10 @@ public:
s); s);
} }
result_type operator()(const Weighted_point &p1, result_type operator()(const Weighted_point_3 &p1,
const Weighted_point &p2, const Weighted_point_3 &p2,
const Weighted_point &p3, const Weighted_point_3 &p3,
const Bare_point &x) const const Point_3 &x) const
{ {
return side_of_mixed_cellC3(p1.x(),p1.y(),p1.z(),p1.weight(), return side_of_mixed_cellC3(p1.x(),p1.y(),p1.z(),p1.weight(),
p2.x(),p2.y(),p2.z(),p2.weight(), p2.x(),p2.y(),p2.z(),p2.weight(),
@ -68,11 +68,11 @@ public:
s); s);
} }
result_type operator()(const Weighted_point &p1, result_type operator()(const Weighted_point_3 &p1,
const Weighted_point &p2, const Weighted_point_3 &p2,
const Weighted_point &p3, const Weighted_point_3 &p3,
const Weighted_point &p4, const Weighted_point_3 &p4,
const Bare_point &x) const const Point_3 &x) const
{ {
return side_of_mixed_cellC3(p1.x(),p1.y(),p1.z(),p1.weight(), return side_of_mixed_cellC3(p1.x(),p1.y(),p1.z(),p1.weight(),
p2.x(),p2.y(),p2.z(),p2.weight(), p2.x(),p2.y(),p2.z(),p2.weight(),
@ -94,16 +94,16 @@ class Construct_anchor_point_3
{ {
public: public:
typedef typename K::FT FT; typedef typename K::FT FT;
typedef typename K::Point_3 Bare_point; typedef typename K::Point_3 Point_3;
typedef Bare_point result_type; typedef Point_3 result_type;
Construct_anchor_point_3(const FT &shrink) : s(shrink) {} Construct_anchor_point_3(const FT &shrink) : s(shrink) {}
result_type operator()(const Bare_point &p_del, result_type operator()(const Point_3 &p_del,
const Bare_point &p_vor) const const Point_3 &p_vor) const
{ {
return Bare_point((1-s)*p_del.x() + s*p_vor.x(), return Point_3((1-s)*p_del.x() + s*p_vor.x(),
(1-s)*p_del.y() + s*p_vor.y(), (1-s)*p_del.y() + s*p_vor.y(),
(1-s)*p_del.z() + s*p_vor.z()); (1-s)*p_del.z() + s*p_vor.z());
} }