mirror of https://github.com/CGAL/cgal
Fix point() for P3T3/P3DT3/P3RT3/P3M3
This commit is contained in:
parent
f5fd746503
commit
58cc66188e
|
|
@ -1038,8 +1038,7 @@ get_maximum_weight(const Vertex_handle protection_vertex, const FT intended_weig
|
||||||
max_possible_weight = minimal_weight_;
|
max_possible_weight = minimal_weight_;
|
||||||
|
|
||||||
CGAL_assertion_code(const Weighted_point& pvwp = c3t3_.triangulation().point(protection_vertex);)
|
CGAL_assertion_code(const Weighted_point& pvwp = c3t3_.triangulation().point(protection_vertex);)
|
||||||
CGAL_assertion_code(const Bare_point& pvp =
|
CGAL_assertion_code(const Bare_point& pvp = c3t3_.triangulation().geom_traits().construct_point_3_object()(pvwp);)
|
||||||
c3t3_.triangulation().geom_traits().construct_point_3_object()(pvwp);)
|
|
||||||
CGAL_assertion_code(const int dim = get_dimension(protection_vertex);)
|
CGAL_assertion_code(const int dim = get_dimension(protection_vertex);)
|
||||||
CGAL_assertion_code(const Index index = c3t3_.index(protection_vertex);)
|
CGAL_assertion_code(const Index index = c3t3_.index(protection_vertex);)
|
||||||
CGAL_assertion_code(const FT w_max = CGAL::square(query_size(pvp, dim, index));)
|
CGAL_assertion_code(const FT w_max = CGAL::square(query_size(pvp, dim, index));)
|
||||||
|
|
|
||||||
|
|
@ -202,6 +202,12 @@ public:
|
||||||
return P3T3::internal::robust_canonicalize_point(p, geom_traits());
|
return P3T3::internal::robust_canonicalize_point(p, geom_traits());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 1-cover, so we can take a const&
|
||||||
|
const Weighted_point& point(const Vertex_handle v) const
|
||||||
|
{
|
||||||
|
return v->point();
|
||||||
|
}
|
||||||
|
|
||||||
Triangle triangle(const Facet& f) const
|
Triangle triangle(const Facet& f) const
|
||||||
{
|
{
|
||||||
Periodic_triangle ptri = periodic_triangle(f);
|
Periodic_triangle ptri = periodic_triangle(f);
|
||||||
|
|
@ -513,7 +519,7 @@ public:
|
||||||
|
|
||||||
CGAL_precondition(f.first != Cell_handle() && f.first->has_vertex(ref_v));
|
CGAL_precondition(f.first != Cell_handle() && f.first->has_vertex(ref_v));
|
||||||
const int ref_v_pos = f.first->index(ref_v);
|
const int ref_v_pos = f.first->index(ref_v);
|
||||||
const Bare_point ref_p = cp(point(ref_v));
|
const Bare_point& ref_p = cp(point(ref_v));
|
||||||
const Bare_point ref_p_in_f = cp(point(f.first, ref_v_pos));
|
const Bare_point ref_p_in_f = cp(point(f.first, ref_v_pos));
|
||||||
Vector_3 move_to_canonical = cv(ref_p_in_f, ref_p);
|
Vector_3 move_to_canonical = cv(ref_p_in_f, ref_p);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -665,29 +665,6 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/** @name Geometric access functions */
|
|
||||||
|
|
||||||
Point point(const Periodic_point& pp) const
|
|
||||||
{
|
|
||||||
return point(pp, geom_traits().construct_point_3_object());
|
|
||||||
}
|
|
||||||
|
|
||||||
// The following functions return the "real" position in space (unrestrained
|
|
||||||
// to the fundamental domain) of the vertices v and c->vertex(idx),
|
|
||||||
// respectively
|
|
||||||
|
|
||||||
Point point(Vertex_handle v) const
|
|
||||||
{
|
|
||||||
return point(v, geom_traits().construct_point_3_object());
|
|
||||||
}
|
|
||||||
|
|
||||||
Point point(Cell_handle c, int idx) const
|
|
||||||
{
|
|
||||||
return point(c, idx, geom_traits().construct_point_3_object());
|
|
||||||
}
|
|
||||||
|
|
||||||
// end of geometric functions
|
|
||||||
|
|
||||||
Periodic_point periodic_circumcenter(Cell_handle c) const {
|
Periodic_point periodic_circumcenter(Cell_handle c) const {
|
||||||
return Base::periodic_circumcenter(c, geom_traits().construct_circumcenter_3_object());
|
return Base::periodic_circumcenter(c, geom_traits().construct_circumcenter_3_object());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -693,14 +693,6 @@ public:
|
||||||
return point(periodic_point(v), cp);
|
return point(periodic_point(v), cp);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual Point point(Vertex_handle) const
|
|
||||||
{
|
|
||||||
// This is a purely virtual function, but it cannot be made "= 0;" otherwise
|
|
||||||
// one cannot use P3T3 by itself (which never happens except in tests...)
|
|
||||||
CGAL_assertion(false);
|
|
||||||
return Point();
|
|
||||||
};
|
|
||||||
|
|
||||||
template <class ConstructPoint>
|
template <class ConstructPoint>
|
||||||
Point point(Cell_handle c, int idx, ConstructPoint cp) const
|
Point point(Cell_handle c, int idx, ConstructPoint cp) const
|
||||||
{
|
{
|
||||||
|
|
@ -758,13 +750,24 @@ public:
|
||||||
return Point();
|
return Point();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual Point point(Cell_handle, int) const
|
Point point(const Periodic_point& pp) const
|
||||||
{
|
{
|
||||||
// This is a purely virtual function, but it cannot be made "= 0;" otherwise
|
return point(pp, geom_traits().construct_point_3_object());
|
||||||
// one cannot use P3T3 by itself (which never happens except in tests...)
|
}
|
||||||
CGAL_assertion(false);
|
|
||||||
return Point();
|
// The following functions return the "real" position in space (unrestrained
|
||||||
};
|
// to the fundamental domain) of the vertices v and c->vertex(idx),
|
||||||
|
// respectively
|
||||||
|
|
||||||
|
Point point(Vertex_handle v) const
|
||||||
|
{
|
||||||
|
return point(v, geom_traits().construct_point_3_object());
|
||||||
|
}
|
||||||
|
|
||||||
|
Point point(Cell_handle c, int idx) const
|
||||||
|
{
|
||||||
|
return point(c, idx, geom_traits().construct_point_3_object());
|
||||||
|
}
|
||||||
|
|
||||||
Periodic_point periodic_point(const Vertex_handle v) const
|
Periodic_point periodic_point(const Vertex_handle v) const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue