From 42decee4670a44475ae343e38ed14396b7c48d52 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 26 Mar 2024 11:14:50 +0100 Subject: [PATCH] move default property map All_cells_selected to a new file --- .../internal/property_maps.h | 49 +++++++++++++++++++ .../tetrahedral_adaptive_remeshing_impl.h | 16 +----- 2 files changed, 50 insertions(+), 15 deletions(-) create mode 100644 Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/property_maps.h diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/property_maps.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/property_maps.h new file mode 100644 index 00000000000..5d6ca9bc89a --- /dev/null +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/property_maps.h @@ -0,0 +1,49 @@ +// Copyright (c) 2020 GeometryFactory (France) and Telecom Paris (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Jane Tournois + +#ifndef CGAL_TETRAHEDRAL_REMESHING_PROPERTY_MAPS_H +#define CGAL_TETRAHEDRAL_REMESHING_PROPERTY_MAPS_H + +#include + +#include + + +namespace CGAL +{ +namespace Tetrahedral_remeshing +{ +namespace internal +{ + +template +struct All_cells_selected +{ + using key_type = typename Tr::Cell_handle; + using value_type = bool; + using reference = bool; + using category = boost::read_write_property_map_tag; + + friend value_type get(const All_cells_selected&, const key_type& c) + { + using SI = typename Tr::Cell::Subdomain_index; + return c->subdomain_index() != SI(); + } + friend void put(All_cells_selected&, const key_type&, const value_type) + {} //nothing to do : subdomain indices are updated in remeshing}; +}; + +} // end namespace internal +} // end namespace Tetrahedral_remeshing +} // end namespace CGAL + +#endif // CGAL_TETRAHEDRAL_REMESHING_PROPERTY_MAPS_H diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h index 8edee1ede64..a5939efc3f8 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -58,22 +59,7 @@ public: void after_flip(CellHandle /* c */) {} }; -template -struct All_cells_selected -{ - using key_type = typename Tr::Cell_handle; - using value_type = bool; - using reference = bool; - using category = boost::read_write_property_map_tag; - friend value_type get(const All_cells_selected&, const key_type& c) - { - using SI = typename Tr::Cell::Subdomain_index; - return c->subdomain_index() != SI(); - } - friend void put(All_cells_selected&, const key_type&, const value_type) - {} //nothing to do : subdomain indices are updated in remeshing}; -}; template