From ec00f50eec73c91fda330be457cc796ce17ebd8f Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 28 Mar 2019 11:28:02 +0100 Subject: [PATCH] Use the same primitive type for polyhedron_3 and other types --- .../include/CGAL/Polyhedral_mesh_domain_3.h | 38 +------------------ 1 file changed, 2 insertions(+), 36 deletions(-) diff --git a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h index c34aa4a5413..29c4d3d38ba 100644 --- a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h @@ -211,7 +211,7 @@ public: BOOST_MPL_HAS_XXX_TRAIT_DEF(HalfedgeDS) - template ::value> + template struct Primitive_type { //setting OneFaceGraphPerTree to false transforms the id type into //std::pair. @@ -230,41 +230,7 @@ public: } }; // Primitive_type (for non-Polyhedron_3) - template struct Primitive_type { - typedef AABB_face_graph_triangle_primitive

type; - - static - typename IGT_::Triangle_3 datum(const typename type::Id face_handle) { - typedef typename IGT_::Point_3 Point; - const Point& a = face_handle->halfedge()->vertex()->point(); - const Point& b = face_handle->halfedge()->next()->vertex()->point(); - const Point& c = face_handle->halfedge()->next()->next()->vertex()->point(); - return typename IGT_::Triangle_3(a,b,c); - } - - static Surface_patch_index get_index(const typename type::Id face_handle, - Tag_false) - { - typename boost::property_map >::type pmap; - return get(pmap, face_handle); - } - - static Surface_patch_index get_index(const typename type::Id, - Tag_true) - { - return Surface_patch_index(0,1); - } - - static Surface_patch_index get_index(const typename type::Id face_handle) - { - namespace m = boost::mpl; - return get_index(face_handle, - Boolean_tag, - boost::is_same - >::value>()); - } - }; // Primitive_type specialized for CGAL::Polyehdron_3 - + public: typedef typename Primitive_type::type Ins_fctor_primitive; typedef CGAL::AABB_traits Ins_fctor_traits;