From 6ef74c39b53ea49163a5dff1715c2e09de99a917 Mon Sep 17 00:00:00 2001 From: Konstantinos Katrioplas Date: Thu, 8 Mar 2018 17:08:05 +0100 Subject: [PATCH] conditional inclusion of cdt2 headers --- .../triangulate_faces.h | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h index 4ee3f130709..42d27683ecd 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h @@ -29,15 +29,17 @@ #include #include +#ifndef CGAL_TRIANGULATE_FACES_DO_NOT_USE_CDT2 #include #include #include #include +#endif +#include #include #include #include -#include #include #include @@ -66,25 +68,11 @@ class Triangulate_modifier typedef typename boost::graph_traits::edge_descriptor edge_descriptor; typedef typename Kernel::Point_3 Point; - typedef CGAL::Triangulation_2_projection_traits_3 P_traits; - - typedef CGAL::Triangulation_vertex_base_with_info_2 Vb; - struct Face_info { typename boost::graph_traits::halfedge_descriptor e[3]; bool is_external; }; - typedef CGAL::Triangulation_face_base_with_info_2 Fb1; - typedef CGAL::Constrained_triangulation_face_base_2 Fb; - typedef CGAL::Triangulation_data_structure_2 TDS; - typedef CGAL::Exact_intersections_tag Itag; - typedef CGAL::Constrained_Delaunay_triangulation_2 CDT; - typedef typename boost::property_traits::reference Point_ref; VertexPointMap _vpmap; @@ -94,7 +82,8 @@ public: { } - bool is_external(typename CDT::Face_handle fh) const { + template + bool is_external(Face_handle fh) const { return fh->info().is_external; } @@ -143,6 +132,17 @@ public: #ifdef CGAL_TRIANGULATE_FACES_DO_NOT_USE_CDT2 return triangulate_face_with_hole_filling(f, pmesh); #else + typedef CGAL::Triangulation_2_projection_traits_3 P_traits; + typedef CGAL::Triangulation_vertex_base_with_info_2 Vb; + typedef CGAL::Triangulation_face_base_with_info_2 Fb1; + typedef CGAL::Constrained_triangulation_face_base_2 Fb; + typedef CGAL::Triangulation_data_structure_2 TDS; + typedef CGAL::Exact_intersections_tag Itag; + typedef CGAL::Constrained_Delaunay_triangulation_2 CDT; P_traits cdt_traits(normal); CDT cdt(cdt_traits); return triangulate_face_with_CDT(f, pmesh, cdt);