From 698eca86982e9604b0f314a47289bcb0f4294c0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 3 Dec 2020 18:54:38 +0100 Subject: [PATCH] use std + make it work with EPECK --- .../include/CGAL/Polyhedral_envelope.h | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h b/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h index cf721e1fa33..5cf37cebb18 100644 --- a/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h +++ b/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h @@ -84,7 +84,7 @@ #include #include - +#include #ifdef DOXYGEN_RUNNING #define CGAL_PMP_NP_TEMPLATE_PARAMETERS NamedParameters #define CGAL_PMP_NP_CLASS NamedParameters @@ -193,7 +193,9 @@ private: : ep(ep), eq(eq), er(er), eplane(ep,eq,er) {} - Plane(const Point_3& p, const Point_3& q, const Point_3& r) + template + Plane(const Point& p, const Point& q, const Point& r, + typename std::enable_if::value>::type* = 0) : ep(p.x(),p.y(),p.z()), eq(q.x(),q.y(),q.z()), er(r.x(),r.y(),r.z()), eplane(ep,eq,er) {} ePoint_3 ep, eq, er; @@ -399,7 +401,7 @@ public: double epsilon, const NamedParameters& np #ifndef DOXYGEN_RUNNING - , typename boost::disable_if>::type* = 0 + , typename std::enable_if::value>::type* = 0 #endif ) { @@ -474,7 +476,7 @@ public: double epsilon, const NamedParameters& np #ifndef DOXYGEN_RUNNING - , typename boost::enable_if>::type* = 0 + , typename std::enable_if::value>::type* = 0 #endif ) { @@ -513,7 +515,7 @@ public: Polyhedral_envelope(const FaceRange& face_range, const TriangleMesh& tmesh, double epsilon, - typename boost::disable_if>::type* = 0) + typename std::enable_if::value>::type* = 0) : Polyhedral_envelope(face_range, tmesh, epsilon, parameters::all_default()) {} @@ -521,7 +523,7 @@ public: Polyhedral_envelope(const PointRange& points, const TriangleRange& triangles, double epsilon, - typename boost::enable_if>::type* = 0) + typename std::enable_if::value>::type* = 0) : Polyhedral_envelope(points, triangles, epsilon, parameters::all_default()) {} #endif @@ -2102,7 +2104,7 @@ public: template bool operator()(const TriangleMesh& tmesh, - typename boost::disable_if>::type* = 0) const + typename std::enable_if::value>::type* = 0) const { return this->operator()(tmesh, parameters::all_default()); } @@ -2146,14 +2148,13 @@ public: Point_map pm = choose_parameter(get_parameter(np, internal_np::point_map)); std::array pts; - for (const Triangle& f : triangles) { typename Triangle::const_iterator t_it = f.begin(); - - if (! this->operator()(get(pm, points[*t_it]), - get(pm, points[*++t_it]), - get(pm, points[*++t_it])) ) + pts[0]=get(pm, points[*t_it]); + pts[1]=get(pm, points[*(++t_it)]); + pts[2]=get(pm, points[*(++t_it)]); + if (! this->operator()(pts[0], pts[1], pts[2]) ) { return false; } @@ -2185,7 +2186,7 @@ public: bool operator()(const TriangleRange& triangle_range #ifndef DOXYGEN_RUNNING - , typename boost::enable_if>::type* = 0 + , typename std::enable_if::value>::type* = 0 #endif ) const {