From 0ba726795f1451f5a86cbf1173e2e1d4f5afe346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 24 Jul 2024 10:22:11 +0200 Subject: [PATCH] Further fixes after review --- .../IsosurfacingDomainWithGradient_3.h | 2 +- .../Concepts/IsosurfacingDomain_3.h | 6 +-- .../IsosurfacingEdgeIntersectionOracle_3.h | 4 +- .../Concepts/IsosurfacingGradientField_3.h | 2 +- .../Concepts/partition_traits.h | 2 +- .../contouring_implicit_data.cpp | 4 +- .../CGAL/Isosurfacing_3/Cartesian_grid_3.h | 46 +++++++++---------- .../Finite_difference_gradient_3.h | 2 +- .../CGAL/Isosurfacing_3/dual_contouring_3.h | 2 +- .../edge_intersection_oracles_3.h | 8 ++-- .../internal/Isosurfacing_domain_3.h | 2 +- .../Isosurfacing_3/internal/Octree_wrapper.h | 12 ++--- .../internal/marching_cubes_functors.h | 2 +- .../partition_traits_Cartesian_grid.h | 2 +- .../CGAL/Isosurfacing_3/internal/tables.h | 2 +- 15 files changed, 49 insertions(+), 49 deletions(-) diff --git a/Isosurfacing_3/doc/Isosurfacing_3/Concepts/IsosurfacingDomainWithGradient_3.h b/Isosurfacing_3/doc/Isosurfacing_3/Concepts/IsosurfacingDomainWithGradient_3.h index 50369f222558..ff72f3b738dd 100644 --- a/Isosurfacing_3/doc/Isosurfacing_3/Concepts/IsosurfacingDomainWithGradient_3.h +++ b/Isosurfacing_3/doc/Isosurfacing_3/Concepts/IsosurfacingDomainWithGradient_3.h @@ -44,7 +44,7 @@ class IsosurfacingDomainWithGradient_3 /// @{ /*! - returns the gradient at the position `p`. + returns the gradient at the point `p`. */ Vector_3 gradient(Point_3 p) const; diff --git a/Isosurfacing_3/doc/Isosurfacing_3/Concepts/IsosurfacingDomain_3.h b/Isosurfacing_3/doc/Isosurfacing_3/Concepts/IsosurfacingDomain_3.h index 272a5592c9ab..81c14bd1b494 100644 --- a/Isosurfacing_3/doc/Isosurfacing_3/Concepts/IsosurfacingDomain_3.h +++ b/Isosurfacing_3/doc/Isosurfacing_3/Concepts/IsosurfacingDomain_3.h @@ -94,7 +94,7 @@ class IsosurfacingDomain_3 Geom_traits geom_traits(); /*! - returns the 3D position of the vertex `v`. + returns the 3D location of the vertex `v`. */ Point_3 point(vertex_descriptor v) const; @@ -167,8 +167,8 @@ class IsosurfacingDomain_3 /*! Constructs the intersection - if it exists - between an edge and an isosurface. - \param p_0 the geometric position of the first vertex of the edge - \param p_1 the geometric position of the second vertex of the edge + \param p_0 the location of the first vertex of the edge + \param p_1 the location of the second vertex of the edge \param val_0 the value at the first vertex of the edge \param val_1 the value at the second vertex of the edge \param isovalue the isovalue defining the isosurface with which we seek an intersection diff --git a/Isosurfacing_3/doc/Isosurfacing_3/Concepts/IsosurfacingEdgeIntersectionOracle_3.h b/Isosurfacing_3/doc/Isosurfacing_3/Concepts/IsosurfacingEdgeIntersectionOracle_3.h index 1a783179a6a2..c5177d2299f3 100644 --- a/Isosurfacing_3/doc/Isosurfacing_3/Concepts/IsosurfacingEdgeIntersectionOracle_3.h +++ b/Isosurfacing_3/doc/Isosurfacing_3/Concepts/IsosurfacingEdgeIntersectionOracle_3.h @@ -23,8 +23,8 @@ class IsosurfacingEdgeIntersectionOracle_3 * * \tparam Domain must be a model of `IsosurfacingDomain_3` * - * \param p_0 the geometric position of the first vertex of the edge - * \param p_1 the geometric position of the second vertex of the edge + * \param p_0 the location of the first vertex of the edge + * \param p_1 the location of the second vertex of the edge * \param val_0 the value at the first vertex of the edge * \param val_1 the value at the second vertex of the edge * \param domain the isosurfacing domain diff --git a/Isosurfacing_3/doc/Isosurfacing_3/Concepts/IsosurfacingGradientField_3.h b/Isosurfacing_3/doc/Isosurfacing_3/Concepts/IsosurfacingGradientField_3.h index 906e2fccda9e..26369fac7fa5 100644 --- a/Isosurfacing_3/doc/Isosurfacing_3/Concepts/IsosurfacingGradientField_3.h +++ b/Isosurfacing_3/doc/Isosurfacing_3/Concepts/IsosurfacingGradientField_3.h @@ -32,7 +32,7 @@ class IsosurfacingGradientField_3 typedef unspecified_type Vector_3; /*! - returns the gradient at the position `p`. + returns the gradient at the point `p`. */ Vector_3 operator()(Point_3 p) const; }; diff --git a/Isosurfacing_3/doc/Isosurfacing_3/Concepts/partition_traits.h b/Isosurfacing_3/doc/Isosurfacing_3/Concepts/partition_traits.h index 7097d7a6fbe3..b92956d848dc 100644 --- a/Isosurfacing_3/doc/Isosurfacing_3/Concepts/partition_traits.h +++ b/Isosurfacing_3/doc/Isosurfacing_3/Concepts/partition_traits.h @@ -58,7 +58,7 @@ class partition_traits typedef unspecified_type Cell_edges; /*! - * \returns the 3D position of the vertex `v`. + * \returns the 3D location of the vertex `v`. */ static Point_3 point(vertex_descriptor v, IsosurfacingPartition_3 partition); diff --git a/Isosurfacing_3/examples/Isosurfacing_3/contouring_implicit_data.cpp b/Isosurfacing_3/examples/Isosurfacing_3/contouring_implicit_data.cpp index 58a864f6aefc..7175c1de27a8 100644 --- a/Isosurfacing_3/examples/Isosurfacing_3/contouring_implicit_data.cpp +++ b/Isosurfacing_3/examples/Isosurfacing_3/contouring_implicit_data.cpp @@ -20,8 +20,8 @@ using FT = typename Kernel::FT; using Point = typename Kernel::Point_3; using Vector = typename Kernel::Vector_3; -// using Grid = CGAL::Isosurfacing::Cartesian_grid_3; -using Grid = CGAL::Isosurfacing::Cartesian_grid_3; +// using Grid = CGAL::Isosurfacing::Cartesian_grid_3; +using Grid = CGAL::Isosurfacing::Cartesian_grid_3; using Values = CGAL::Isosurfacing::Value_function_3; using Gradients = CGAL::Isosurfacing::Gradient_function_3; diff --git a/Isosurfacing_3/include/CGAL/Isosurfacing_3/Cartesian_grid_3.h b/Isosurfacing_3/include/CGAL/Isosurfacing_3/Cartesian_grid_3.h index 680c17a5b63b..a2cbdf79578c 100644 --- a/Isosurfacing_3/include/CGAL/Isosurfacing_3/Cartesian_grid_3.h +++ b/Isosurfacing_3/include/CGAL/Isosurfacing_3/Cartesian_grid_3.h @@ -31,9 +31,9 @@ namespace Isosurfacing { /** * \ingroup IS_Partitions_helpers_grp * - * A policy to choose whether grid vertex positions should be cached, or recomputed at each access. + * A policy to choose whether grid vertex locations should be cached, or recomputed at each access. * - * \tparam Tag a tag that is either `Tag_true` (positions are cached) or `Tag_false` (positions are not cached). + * \tparam Tag a tag that is either `Tag_true` (locations are cached) or `Tag_false` (locations are not cached). */ template struct Grid_vertex_memory_policy : public Tag { }; @@ -41,30 +41,30 @@ struct Grid_vertex_memory_policy : public Tag { }; /** * \ingroup IS_Partitions_helpers_grp * - * A convenience alias for the policy that caches grid vertex positions. + * A convenience alias for the policy that caches grid vertex locations. */ -using Cache_positions = Grid_vertex_memory_policy; +using Cache_vertex_locations = Grid_vertex_memory_policy; /** * \ingroup IS_Partitions_helpers_grp * - * A convenience alias for the policy that does not cache grid vertex positions. + * A convenience alias for the policy that does not cache grid vertex locations. */ -using Do_not_cache_positions = Grid_vertex_memory_policy; +using Do_not_cache_vertex_locations = Grid_vertex_memory_policy; namespace internal { template -struct Cartesian_grid_position + typename MemoryPolicy = Do_not_cache_vertex_locations> +struct Cartesian_grid_location { using Point_3 = typename GeomTraits::Point_3; using Vector_3 = typename GeomTraits::Vector_3; using Iso_cuboid_3 = typename GeomTraits::Iso_cuboid_3; - Cartesian_grid_position() { } // just for compilation + Cartesian_grid_location() { } // just for compilation - Cartesian_grid_position(const Iso_cuboid_3& /*span*/, + Cartesian_grid_location(const Iso_cuboid_3& /*span*/, const std::array& /*dims*/, const Vector_3& /*spacing*/) { } @@ -89,7 +89,7 @@ struct Cartesian_grid_position }; template -struct Cartesian_grid_position +struct Cartesian_grid_location { using Point_3 = typename GeomTraits::Point_3; using Vector_3 = typename GeomTraits::Vector_3; @@ -97,9 +97,9 @@ struct Cartesian_grid_position std::vector m_points; - Cartesian_grid_position() { } // just for compilation + Cartesian_grid_location() { } // just for compilation - Cartesian_grid_position(const Iso_cuboid_3& span, + Cartesian_grid_location(const Iso_cuboid_3& span, const std::array& dims, const Vector_3& spacing) { @@ -136,14 +136,14 @@ struct Cartesian_grid_position * that can be used along with value and gradient fields to make up a domain. * * \tparam GeomTraits must be a model of `IsosurfacingTraits_3`. - * \tparam MemoryPolicy whether the geometric positions of the grid vertices are stored or not. - * Possible values are `CGAL::Isosurfacing::Cache_positions` and `CGAL::Isosurfacing::Do_not_cache_positions`. + * \tparam MemoryPolicy whether the geometric locations of the grid vertices are stored or not. + * Possible values are `CGAL::Isosurfacing::Cache_vertex_locations` and `CGAL::Isosurfacing::Do_not_cache_vertex_locations`. * * \sa `CGAL::Isosurfacing::Marching_cubes_domain_3()` * \sa `CGAL::Isosurfacing::Dual_contouring_domain_3()` */ template + typename MemoryPolicy = Do_not_cache_vertex_locations> class Cartesian_grid_3 { public: @@ -153,7 +153,7 @@ class Cartesian_grid_3 using Vector_3 = typename Geom_traits::Vector_3; using Iso_cuboid_3 = typename Geom_traits::Iso_cuboid_3; - using Positioner = internal::Cartesian_grid_position; + using Positioner = internal::Cartesian_grid_location; private: Iso_cuboid_3 m_span; @@ -228,7 +228,7 @@ class Cartesian_grid_3 * \param dimensions the number of grid vertices in the `x`, `y`, and `z` directions * \param gt the geometric traits * - * \pre all dimensions are (strictly) positive. + * \pre all dimensions are strictly positive. */ Cartesian_grid_3(const Iso_cuboid_3& span, const std::array& dimensions, @@ -251,8 +251,8 @@ class Cartesian_grid_3 * \param dimensions the number of grid vertices in the `x`, `y`, and `z` directions * \param gt the geometric traits * - * \pre `p` is lexicographically (strictly) smaller than `q` - * \pre all dimensions are (strictly) positive. + * \pre `p` is lexicographically strictly smaller than `q` + * \pre all dimensions are strictly positive. */ Cartesian_grid_3(const Point_3& p, const Point_3& q, const std::array& dimensions, @@ -291,7 +291,7 @@ class Cartesian_grid_3 * \param spacing the dimension of the paving cell, in the `x`, `y`, and `z` directions, respectively. * \param gt the geometric traits * - * \pre `p` is lexicographically (strictly) smaller than `q` + * \pre `p` is lexicographically strictly smaller than `q` * \pre the diagonal of the iso-cuboid has length a multiple of `spacing` */ Cartesian_grid_3(const Point_3& p, const Point_3& q, @@ -380,9 +380,9 @@ class Cartesian_grid_3 // Geometry public: /** - * \brief returns the geometric position of the grid vertex described by its three indices. + * \brief returns the geometric location of the grid vertex described by its three indices. * - * Depending on the value of the template parameter `cache_points`, positions might not be stored + * Depending on the value of the template parameter `MemoryPolicy`, locations might not be stored * but calculated on-the-fly. * * \param i the index in the `x` direction diff --git a/Isosurfacing_3/include/CGAL/Isosurfacing_3/Finite_difference_gradient_3.h b/Isosurfacing_3/include/CGAL/Isosurfacing_3/Finite_difference_gradient_3.h index b41283bef0d1..69e8a6e46a05 100644 --- a/Isosurfacing_3/include/CGAL/Isosurfacing_3/Finite_difference_gradient_3.h +++ b/Isosurfacing_3/include/CGAL/Isosurfacing_3/Finite_difference_gradient_3.h @@ -72,7 +72,7 @@ class Finite_difference_gradient_3 /** * \brief returns the value the gradient at a point in 3D space. * - * \param p the position at which the gradient is computed. + * \param p the point at which the gradient is computed. */ Vector_3 operator()(const Point_3& p) const { diff --git a/Isosurfacing_3/include/CGAL/Isosurfacing_3/dual_contouring_3.h b/Isosurfacing_3/include/CGAL/Isosurfacing_3/dual_contouring_3.h index 24bcf59e8e1a..ed907ab1e8d4 100644 --- a/Isosurfacing_3/include/CGAL/Isosurfacing_3/dual_contouring_3.h +++ b/Isosurfacing_3/include/CGAL/Isosurfacing_3/dual_contouring_3.h @@ -51,7 +51,7 @@ namespace Isosurfacing { * * \cgalNamedParamsBegin * \cgalParamNBegin{constrain_to_cell} - * \cgalParamDescription{whether to constrain the vertex position to the geometrical space of its cell} + * \cgalParamDescription{whether to constrain the vertex location to the geometrical space of its cell} * \cgalParamType{Boolean} * \cgalParamDefault{`false`} * \cgalParamExtra{Constraining the vertex to its dual cell guarantees that the resulting diff --git a/Isosurfacing_3/include/CGAL/Isosurfacing_3/edge_intersection_oracles_3.h b/Isosurfacing_3/include/CGAL/Isosurfacing_3/edge_intersection_oracles_3.h index 68ecdfb0eb9d..b688f0fa514f 100644 --- a/Isosurfacing_3/include/CGAL/Isosurfacing_3/edge_intersection_oracles_3.h +++ b/Isosurfacing_3/include/CGAL/Isosurfacing_3/edge_intersection_oracles_3.h @@ -62,8 +62,8 @@ struct Dichotomy_edge_intersection * * \tparam Domain must be a model of `IsosurfacingDomain_3` * - * \param p_0 the geometric position of the first vertex of the edge - * \param p_1 the geometric position of the second vertex of the edge + * \param p_0 the location of the first vertex of the edge + * \param p_1 the location of the second vertex of the edge * \param val_0 the value at the first vertex of the edge * \param val_1 the value at the second vertex of the edge * \param domain the isosurfacing domain @@ -149,8 +149,8 @@ struct Linear_interpolation_edge_intersection * * \tparam Domain must be a model of `IsosurfacingDomain_3` * - * \param p_0 the geometric position of the first vertex of the edge - * \param p_1 the geometric position of the second vertex of the edge + * \param p_0 the location of the first vertex of the edge + * \param p_1 the location of the second vertex of the edge * \param val_0 the value at the first vertex of the edge * \param val_1 the value at the second vertex of the edge * \param domain the isosurfacing domain diff --git a/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/Isosurfacing_domain_3.h b/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/Isosurfacing_domain_3.h index f3117cccfb47..0f7d65f54919 100644 --- a/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/Isosurfacing_domain_3.h +++ b/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/Isosurfacing_domain_3.h @@ -89,7 +89,7 @@ class Isosurfacing_domain_3 public: // The following functions are dispatching to the partition_traits' static functions. - // returns the position of vertex `v` + // returns the location of vertex `v` decltype(auto) /*Point_3*/ point(const vertex_descriptor& v) const { return PT::point(v, m_partition); diff --git a/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/Octree_wrapper.h b/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/Octree_wrapper.h index dbd9aeee92da..660d2d13d7bb 100644 --- a/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/Octree_wrapper.h +++ b/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/Octree_wrapper.h @@ -445,7 +445,7 @@ class Octree_wrapper // std::array v; // for(int v_id=0; v_id v; for(int v_id=0; v_id v; // for(int v_id=0; v_id voxel_vertex_positions(const Voxel_handle& vox) const + std::array voxel_vertex_locations(const Voxel_handle& vox) const { Node_index node_index = get_node(vox); return node_points(node_index); @@ -541,7 +541,7 @@ class Octree_wrapper // v1 const std::size_t e_local_index = Tables::edge_store_index[e_global_id % 3]; - const int* v1_local = Tables::local_vertex_position[Tables::edge_to_vertex[e_local_index][1]]; + const int* v1_local = Tables::local_vertex_location[Tables::edge_to_vertex[e_local_index][1]]; const std::size_t i1 = i0 + v1_local[0]; const std::size_t j1 = j0 + v1_local[1]; @@ -568,7 +568,7 @@ class Octree_wrapper // v1 const std::size_t e_local_index = Tables::edge_store_index[e_global_id % 3]; - const int* v1_local = Tables::local_vertex_position[Tables::edge_to_vertex[e_local_index][1]]; + const int* v1_local = Tables::local_vertex_location[Tables::edge_to_vertex[e_local_index][1]]; const std::size_t i1 = i0 + v1_local[0]; const std::size_t j1 = j0 + v1_local[1]; diff --git a/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/marching_cubes_functors.h b/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/marching_cubes_functors.h index 1c6dd8e53c16..a7cfd5452378 100644 --- a/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/marching_cubes_functors.h +++ b/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/marching_cubes_functors.h @@ -60,7 +60,7 @@ namespace CGAL { namespace Isosurfacing { namespace internal { -// Interpolate linearly between two vertex positions v0, v1 with values d0 and d1 according to the isovalue +// Interpolate linearly between two vertex locations v0, v1 with values d0 and d1 according to the isovalue template typename GeomTraits::Point_3 vertex_interpolation(const typename GeomTraits::Point_3& p0, const typename GeomTraits::Point_3& p1, diff --git a/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/partition_traits_Cartesian_grid.h b/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/partition_traits_Cartesian_grid.h index 9b2b46837648..1b4bcf5be2d6 100644 --- a/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/partition_traits_Cartesian_grid.h +++ b/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/partition_traits_Cartesian_grid.h @@ -111,7 +111,7 @@ struct partition_traits > for(std::size_t j=0; j