mirror of https://github.com/CGAL/cgal
Periodic_3 remove traits must overwrite construct_point_3()
This commit is contained in:
parent
07bbe7fa0a
commit
192821fe85
|
|
@ -30,6 +30,21 @@
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
// Triangulation_3 has calls to Construct_point_3 to handle weighted and bare points.
|
||||||
|
// The default inherited Construct_point_3 inherited by Periodic_3_triangulation_remove_traits_3
|
||||||
|
// must be overwritten by a construction Construct_point_3 that offers:
|
||||||
|
// - pair<K::Point_3, offset> --> pair<K::Point_3, offset> (identity)
|
||||||
|
// - pair<K::Weighted_point_3, offset> --> pair<K::Point_3, offset> (will be added when needed)
|
||||||
|
template < class Traits_ >
|
||||||
|
class Construct_point_3_remove_traits
|
||||||
|
{
|
||||||
|
typedef Traits_ Traits;
|
||||||
|
typedef typename Traits::Point_3 Point_3; // actually a pair <K::Point_3, offset>
|
||||||
|
|
||||||
|
public:
|
||||||
|
const Point_3& operator()(const Point_3& p) { return p; }
|
||||||
|
};
|
||||||
|
|
||||||
template < class Traits_, class Functor_ >
|
template < class Traits_, class Functor_ >
|
||||||
class Point_offset_adaptor {
|
class Point_offset_adaptor {
|
||||||
typedef Traits_ Traits;
|
typedef Traits_ Traits;
|
||||||
|
|
@ -86,6 +101,9 @@ public:
|
||||||
_pt.set_domain(domain);
|
_pt.set_domain(domain);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Construct point
|
||||||
|
typedef Construct_point_3_remove_traits<Self> Construct_point_3;
|
||||||
|
|
||||||
// Triangulation traits
|
// Triangulation traits
|
||||||
typedef Point_offset_adaptor<Self, typename PT::Compare_xyz_3>
|
typedef Point_offset_adaptor<Self, typename PT::Compare_xyz_3>
|
||||||
Compare_xyz_3;
|
Compare_xyz_3;
|
||||||
|
|
@ -104,6 +122,11 @@ public:
|
||||||
Compare_distance_3;
|
Compare_distance_3;
|
||||||
|
|
||||||
// Operations
|
// Operations
|
||||||
|
Construct_point_3
|
||||||
|
construct_point_3_object() const {
|
||||||
|
return Construct_point_3();
|
||||||
|
}
|
||||||
|
|
||||||
Compare_xyz_3
|
Compare_xyz_3
|
||||||
compare_xyz_3_object() const {
|
compare_xyz_3_object() const {
|
||||||
return Compare_xyz_3(_pt.compare_xyz_3_object());
|
return Compare_xyz_3(_pt.compare_xyz_3_object());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue