From 11c3a490d1fc34e0aa475ed5e50902be0e9b3a96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 23 Aug 2017 10:52:30 +0200 Subject: [PATCH] Added functions / enum necessary for P2DT2 to be usable in 2D Alpha Shapes --- .../include/CGAL/Periodic_2_triangulation_2.h | 13 +++++++++++-- .../test_p2t2_triangulation_point_location.cpp | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2.h b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2.h index cc42614b2b0..8243f5020c6 100644 --- a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2.h +++ b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2.h @@ -83,8 +83,10 @@ public: /// The point type typedef typename Gt::Point_2 Point; - /// The segment type + /// The vector type typedef typename Gt::Segment_2 Segment; + /// The segment type + typedef typename Gt::Vector_2 Vector; /// The triangle type typedef typename Gt::Triangle_2 Triangle; @@ -175,8 +177,15 @@ public: FACE, /// The query point lies outside the affine hull of the triangulation, /// which is the case when the triangulation is empty. - EMPTY + EMPTY, + OUTSIDE_CONVEX_HULL, // unused, for compatibility with Alpha_shape_2 + OUTSIDE_AFFINE_HULL // unused, for compatibility with Alpha_shape_2 }; + + /// Returns false, no infinite simplices in the periodic triangulation + template + bool is_infinite(const T&, int = 0) const { return false; } + //\} // Auxiliary iterators for convenience diff --git a/Periodic_2_triangulation_2/test/Periodic_2_triangulation_2/test_p2t2_triangulation_point_location.cpp b/Periodic_2_triangulation_2/test/Periodic_2_triangulation_2/test_p2t2_triangulation_point_location.cpp index 76433d46b6f..967abbc5d86 100644 --- a/Periodic_2_triangulation_2/test/Periodic_2_triangulation_2/test_p2t2_triangulation_point_location.cpp +++ b/Periodic_2_triangulation_2/test/Periodic_2_triangulation_2/test_p2t2_triangulation_point_location.cpp @@ -45,7 +45,7 @@ Face_handle test_point_location(const Triangulation &t, CGAL_assertion(os == CGAL::ON_POSITIVE_SIDE); break; } - case Triangulation::EMPTY: + default: { // Handled above CGAL_assertion(false);