From b617e090bd662f561a546ffe832cfc752bac76ea Mon Sep 17 00:00:00 2001 From: Julian Stahl Date: Wed, 21 Sep 2022 00:23:02 +0200 Subject: [PATCH] Replace handle and tag parameter --- .../include/CGAL/Dual_contouring_3.h | 6 ++--- .../internal/Dual_contouring_internal.h | 22 +++++++++---------- .../internal/Marching_cubes_3_internal.h | 10 ++++----- .../Isosurfacing_3/internal/Tmc_internal.h | 12 +++++----- .../include/CGAL/Marching_cubes_3.h | 6 ++--- 5 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Isosurfacing_3/include/CGAL/Dual_contouring_3.h b/Isosurfacing_3/include/CGAL/Dual_contouring_3.h index ff88ecdd506..60b2492bf48 100644 --- a/Isosurfacing_3/include/CGAL/Dual_contouring_3.h +++ b/Isosurfacing_3/include/CGAL/Dual_contouring_3.h @@ -13,7 +13,7 @@ #ifndef CGAL_DUAL_CONTOURING_3_H #define CGAL_DUAL_CONTOURING_3_H -#include +#include #include #include #include @@ -54,10 +54,10 @@ void dual_contouring(const Domain_& domain, const typename Domain_::FT iso_value // static_assert(Domain_::CELL_TYPE & ANY_CELL); internal::Dual_contouring_vertex_positioning pos_func(domain, iso_value, positioning); - domain.iterate_cells(pos_func, Concurrency_tag()); + domain.iterate_cells(pos_func); internal::Dual_contouring_face_generation face_generation(domain, iso_value); - domain.iterate_edges(face_generation, Concurrency_tag()); + domain.iterate_edges(face_generation); // write points and faces in ranges points.resize(pos_func.points_counter); diff --git a/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/Dual_contouring_internal.h b/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/Dual_contouring_internal.h index 8777913902d..b01715a7ae2 100644 --- a/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/Dual_contouring_internal.h +++ b/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/Dual_contouring_internal.h @@ -61,7 +61,7 @@ public: */ template bool position(const Domain_& domain, const typename Domain_::FT iso_value, - const typename Domain_::Cell_handle& cell, typename Domain_::Point& point) const { + const typename Domain_::Cell_descriptor& cell, typename Domain_::Point& point) const { typedef typename Domain_::Point Point; typedef typename Domain_::Geom_traits::Vector_3 Vector; typedef typename Domain_::FT FT; @@ -170,7 +170,7 @@ public: * \return true, if the voxel intersects the isosurface */ template - bool position(const Domain_& domain, const typename Domain_::FT iso_value, const typename Domain_::Cell_handle& vh, + bool position(const Domain_& domain, const typename Domain_::FT iso_value, const typename Domain_::Cell_descriptor& vh, typename Domain_::Point& point) const { typedef typename Domain_::Point Point; typedef typename Domain_::Geom_traits::Vector_3 Vector; @@ -225,7 +225,7 @@ public: */ template bool position(const Domain_& domain, const typename Domain_::FT iso_value, - const typename Domain_::Cell_handle& cell, typename Domain_::Point& point) const { + const typename Domain_::Cell_descriptor& cell, typename Domain_::Point& point) const { typedef typename Domain_::Point Point; typedef typename Domain_::Geom_traits::Vector_3 Vector; typedef typename Domain_::FT FT; @@ -273,13 +273,13 @@ private: typedef typename Domain::FT FT; typedef typename Domain::Point Point; - typedef typename Domain::Cell_handle Cell_handle; + typedef typename Domain::Cell_descriptor Cell_descriptor; public: Dual_contouring_vertex_positioning(const Domain& domain, FT iso_value, const Positioning& positioning) : domain(domain), iso_value(iso_value), positioning(positioning), points_counter(0) {} - void operator()(const Cell_handle& v) { + void operator()(const Cell_descriptor& v) { // compute dc-vertices Point p; if (positioning.position(domain, iso_value, v, p)) { @@ -295,8 +295,8 @@ public: FT iso_value; const Positioning& positioning; - std::map map_voxel_to_point_id; - std::map map_voxel_to_point; + std::map map_voxel_to_point_id; + std::map map_voxel_to_point; std::size_t points_counter; std::mutex mutex; @@ -308,13 +308,13 @@ private: typedef Domain_ Domain; typedef typename Domain_::FT FT; - typedef typename Domain_::Edge_handle Edge_handle; - typedef typename Domain_::Cell_handle Cell_handle; + typedef typename Domain_::Edge_descriptor Edge_descriptor; + typedef typename Domain_::Cell_descriptor Cell_descriptor; public: Dual_contouring_face_generation(const Domain& domain, FT iso_value) : domain(domain), iso_value(iso_value) {} - void operator()(const Edge_handle& e) { + void operator()(const Edge_descriptor& e) { // save all faces const auto& vertices = domain.edge_vertices(e); const FT s0 = domain.value(vertices[0]); @@ -335,7 +335,7 @@ public: } // private: - std::map> faces; + std::map> faces; const Domain& domain; FT iso_value; diff --git a/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/Marching_cubes_3_internal.h b/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/Marching_cubes_3_internal.h index e754b9a0ae7..6752038b3f0 100644 --- a/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/Marching_cubes_3_internal.h +++ b/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/Marching_cubes_3_internal.h @@ -78,15 +78,15 @@ Point_3 vertex_interpolation(const Point_3& p0, const Point_3& p1, const FT d0, } template -std::size_t get_cell_corners(const Domain_& domain, const typename Domain_::Cell_handle& cell, +std::size_t get_cell_corners(const Domain_& domain, const typename Domain_::Cell_descriptor& cell, const typename Domain_::FT iso_value, Corners_& corners, Values_& values) { - typedef typename Domain_::Vertex_handle Vertex_handle; + typedef typename Domain_::Vertex_descriptor Vertex_descriptor; // collect function values and build index std::size_t v_id = 0; std::bitset index = 0; - for (const Vertex_handle& v : domain.cell_vertices(cell)) { + for (const Vertex_descriptor& v : domain.cell_vertices(cell)) { // collect scalar values and computex index corners[v_id] = domain.position(v); values[v_id] = domain.value(v); @@ -163,7 +163,7 @@ private: typedef Domain_ Domain; typedef typename Domain::FT FT; typedef typename Domain::Point Point; - typedef typename Domain::Cell_handle Cell_handle; + typedef typename Domain::Cell_descriptor Cell_descriptor; #ifdef CGAL_LINKED_WITH_TBB typedef tbb::concurrent_vector> Triangle_list; @@ -175,7 +175,7 @@ public: Marching_cubes_functor(const Domain& domain, const FT iso_value) : domain(domain), iso_value(iso_value) {} - void operator()(const Cell_handle& cell) { + void operator()(const Cell_descriptor& cell) { assert(domain.cell_vertices(cell).size() == 8); assert(domain.cell_edges(cell).size() == 12); diff --git a/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/Tmc_internal.h b/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/Tmc_internal.h index 62e0b034430..baac725cc54 100644 --- a/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/Tmc_internal.h +++ b/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/Tmc_internal.h @@ -41,9 +41,9 @@ #ifndef CGAL_TMC_INTERNAL_TMC_H #define CGAL_TMC_INTERNAL_TMC_H -#include #include #include +#include #include #include @@ -65,8 +65,8 @@ private: typedef typename Domain::FT FT; typedef typename Domain::Point Point; typedef typename Domain::Vector Vector; - typedef typename Domain::Edge_handle Edge_handle; - typedef typename Domain::Cell_handle Cell_handle; + typedef typename Domain::Edge_descriptor Edge_descriptor; + typedef typename Domain::Cell_descriptor Cell_descriptor; typedef unsigned int uint; @@ -74,7 +74,7 @@ public: TMC_functor(const Domain& domain, const FT iso_value, Point_range& points, Polygon_range& polygons) : domain(domain), iso_value(iso_value), points(points), polygons(polygons) {} - void operator()(const Cell_handle& cell) { + void operator()(const Cell_descriptor& cell) { FT values[8]; Point corners[8]; @@ -135,7 +135,7 @@ public: triangle.push_back(p2); } - void p_slice(const Cell_handle& cell, const double i0, FT* values, Point* corners, const int i_case) { + void p_slice(const Cell_descriptor& cell, const double i0, FT* values, Point* corners, const int i_case) { // there are 12 edges, assign to each vertex three edges, the global edge numbering // consist of 3*global_vertex_id + edge_offset. const unsigned long long gei_pattern_ = 670526590282893600ull; @@ -960,7 +960,7 @@ private: // compute a unique global index for vertices // use as key the unique edge number - std::map vertex_map; + std::map vertex_map; std::mutex mutex; }; diff --git a/Isosurfacing_3/include/CGAL/Marching_cubes_3.h b/Isosurfacing_3/include/CGAL/Marching_cubes_3.h index be3ced5419f..d3200b8148c 100644 --- a/Isosurfacing_3/include/CGAL/Marching_cubes_3.h +++ b/Isosurfacing_3/include/CGAL/Marching_cubes_3.h @@ -12,7 +12,7 @@ #ifndef CGAL_MARCHING_CUBES_3_H #define CGAL_MARCHING_CUBES_3_H -#include +#include #include #include #include @@ -49,10 +49,10 @@ void marching_cubes(const Domain_& domain, const typename Domain_::FT iso_value, if (topologically_correct) { internal::TMC_functor functor(domain, iso_value, points, polygons); - domain.iterate_cells(functor, Concurrency_tag()); + domain.iterate_cells(functor); } else { internal::Marching_cubes_functor functor(domain, iso_value); - domain.iterate_cells(functor, Concurrency_tag()); + domain.iterate_cells(functor); internal::to_indexed_face_set(functor.get_triangles(), points, polygons); } }