From 225fe9f89d34c462ebd3d6ee9e16e9c1999c0b11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Sat, 24 Feb 2024 23:11:58 +0100 Subject: [PATCH] Doc improvements --- .../contouring_seq_vs_parallel_image.cpp | 2 +- .../contouring_seq_vs_parallel_implicit.cpp | 2 +- .../Isosurfacing_3/Concepts/GradientField_3.h | 4 +- .../Isosurfacing_3/Concepts/ValueField_3.h | 4 +- .../contouring_discrete_data.cpp | 2 +- .../Isosurfacing_3/contouring_image.cpp | 2 +- .../contouring_implicit_data.cpp | 2 +- .../Isosurfacing_3/contouring_mesh_offset.cpp | 2 +- .../Isosurfacing_3/dual_contouring.cpp | 2 +- .../dual_contouring_intersection_oracles.cpp | 2 +- .../dual_contouring_strategies.cpp | 2 +- .../Isosurfacing_3/marching_cubes.cpp | 2 +- .../marching_cubes_strategies.cpp | 2 +- .../CGAL/Isosurfacing_3/Cartesian_grid_3.h | 66 +++++++++---------- .../Isosurfacing_3/Dual_contouring_domain_3.h | 8 +-- .../include/CGAL/Isosurfacing_3/IO/Image_3.h | 10 +-- .../include/CGAL/Isosurfacing_3/IO/OBJ.h | 2 +- .../Isosurfacing_3/Marching_cubes_domain_3.h | 4 +- .../internal/dual_contouring_functors.h | 2 +- .../Isosurfacing_3/interpolation_schemes_3.h | 12 ++-- 20 files changed, 67 insertions(+), 67 deletions(-) diff --git a/Isosurfacing_3/benchmark/Isosurfacing_3/contouring_seq_vs_parallel_image.cpp b/Isosurfacing_3/benchmark/Isosurfacing_3/contouring_seq_vs_parallel_image.cpp index 8505351d61b..976ec98c6bd 100644 --- a/Isosurfacing_3/benchmark/Isosurfacing_3/contouring_seq_vs_parallel_image.cpp +++ b/Isosurfacing_3/benchmark/Isosurfacing_3/contouring_seq_vs_parallel_image.cpp @@ -57,7 +57,7 @@ int main(int argc, char** argv) for (std::size_t k=0; k(150, 150, 150) }; - std::cout << "Bbox: " << grid.bbox() << std::endl; + std::cout << "Span: " << grid.span() << std::endl; std::cout << "Cell dimensions: " << grid.spacing()[0] << " " << grid.spacing()[1] << " " << grid.spacing()[2] << std::endl; std::cout << "Cell #: " << grid.xdim() << ", " << grid.ydim() << ", " << grid.zdim() << std::endl; diff --git a/Isosurfacing_3/doc/Isosurfacing_3/Concepts/GradientField_3.h b/Isosurfacing_3/doc/Isosurfacing_3/Concepts/GradientField_3.h index 9df576de28c..682e4d8ca66 100644 --- a/Isosurfacing_3/doc/Isosurfacing_3/Concepts/GradientField_3.h +++ b/Isosurfacing_3/doc/Isosurfacing_3/Concepts/GradientField_3.h @@ -6,8 +6,8 @@ The concept `GradientField_3` describes the set of requirements to be fulfilled by the gradient field template parameter of the domain class `CGAL::Isosurfacing::Dual_contouring_domain_3`. -Gradient fields must be continuous and defined over the bounding box of whatever -space partitioning data structure (also known as "partition") is being used. +Gradient fields must be continuous and defined over the geometric span of the +space partitioning data structure (also known as "partition") being used. \cgalHasModelsBegin \cgalHasModels{CGAL::Isosurfacing::Gradient_function_3} diff --git a/Isosurfacing_3/doc/Isosurfacing_3/Concepts/ValueField_3.h b/Isosurfacing_3/doc/Isosurfacing_3/Concepts/ValueField_3.h index 469f72b66a6..3ddb6d8bdce 100644 --- a/Isosurfacing_3/doc/Isosurfacing_3/Concepts/ValueField_3.h +++ b/Isosurfacing_3/doc/Isosurfacing_3/Concepts/ValueField_3.h @@ -6,8 +6,8 @@ The concept `ValueField_3` describes the set of requirements to be fulfilled by the value field template parameter of the domain classes `CGAL::Isosurfacing::Marching_cubes_domain_3` and `CGAL::Isosurfacing::Dual_contouring_domain_3`. -Value fields must be continuous and defined over the bounding box of whatever -space partitioning data structure (also known as "partition") is being used. +Value fields must be continuous and defined over the geometric span of the +space partitioning data structure (also known as "partition") being used. \cgalHasModelsBegin \cgalHasModels{CGAL::Isosurfacing::Value_function_3} diff --git a/Isosurfacing_3/examples/Isosurfacing_3/contouring_discrete_data.cpp b/Isosurfacing_3/examples/Isosurfacing_3/contouring_discrete_data.cpp index f82908631da..0ea0a4817ff 100644 --- a/Isosurfacing_3/examples/Isosurfacing_3/contouring_discrete_data.cpp +++ b/Isosurfacing_3/examples/Isosurfacing_3/contouring_discrete_data.cpp @@ -110,7 +110,7 @@ int main(int argc, char** argv) const CGAL::Bbox_3 bbox { -1., -1., -1., 1., 1., 1. }; Grid grid { bbox, CGAL::make_array(30, 30, 30) }; - std::cout << "Bbox: " << grid.bbox() << std::endl; + std::cout << "Span: " << grid.span() << std::endl; std::cout << "Cell dimensions: " << grid.spacing()[0] << " " << grid.spacing()[1] << " " << grid.spacing()[2] << std::endl; std::cout << "Cell #: " << grid.xdim() << ", " << grid.ydim() << ", " << grid.zdim() << std::endl; diff --git a/Isosurfacing_3/examples/Isosurfacing_3/contouring_image.cpp b/Isosurfacing_3/examples/Isosurfacing_3/contouring_image.cpp index 255483cb175..c1136d16718 100644 --- a/Isosurfacing_3/examples/Isosurfacing_3/contouring_image.cpp +++ b/Isosurfacing_3/examples/Isosurfacing_3/contouring_image.cpp @@ -103,7 +103,7 @@ int main(int argc, char* argv[]) return EXIT_FAILURE; } - std::cout << "Bbox: " << grid.bbox() << std::endl; + std::cout << "Span: " << grid.span() << std::endl; std::cout << "Cell dimensions: " << grid.spacing()[0] << " " << grid.spacing()[1] << " " << grid.spacing()[2] << std::endl; std::cout << "Cell #: " << grid.xdim() << ", " << grid.ydim() << ", " << grid.zdim() << std::endl; diff --git a/Isosurfacing_3/examples/Isosurfacing_3/contouring_implicit_data.cpp b/Isosurfacing_3/examples/Isosurfacing_3/contouring_implicit_data.cpp index 0e315292b31..3165e2d0928 100644 --- a/Isosurfacing_3/examples/Isosurfacing_3/contouring_implicit_data.cpp +++ b/Isosurfacing_3/examples/Isosurfacing_3/contouring_implicit_data.cpp @@ -106,7 +106,7 @@ int main(int argc, char** argv) const std::array spacing { step, step, step }; const Grid grid { bbox, spacing }; - std::cout << "Bbox: " << grid.bbox() << std::endl; + std::cout << "Span: " << grid.span() << std::endl; std::cout << "Cell dimensions: " << grid.spacing()[0] << " " << grid.spacing()[1] << " " << grid.spacing()[2] << std::endl; std::cout << "Cell #: " << grid.xdim() << ", " << grid.ydim() << ", " << grid.zdim() << std::endl; diff --git a/Isosurfacing_3/examples/Isosurfacing_3/contouring_mesh_offset.cpp b/Isosurfacing_3/examples/Isosurfacing_3/contouring_mesh_offset.cpp index e809d018e19..1fa836f7aa1 100644 --- a/Isosurfacing_3/examples/Isosurfacing_3/contouring_mesh_offset.cpp +++ b/Isosurfacing_3/examples/Isosurfacing_3/contouring_mesh_offset.cpp @@ -161,7 +161,7 @@ int main(int argc, char** argv) bbox = CGAL::Bbox_3{ -5, -5, -5, 15, 15, 15 }; Grid grid { bbox, CGAL::make_array(nv, nv, nv) }; - std::cout << "Bbox: " << grid.bbox() << std::endl; + std::cout << "Span: " << grid.span() << std::endl; std::cout << "Cell dimensions: " << grid.spacing()[0] << " " << grid.spacing()[1] << " " << grid.spacing()[2] << std::endl; std::cout << "Cell #: " << grid.xdim() << ", " << grid.ydim() << ", " << grid.zdim() << std::endl; diff --git a/Isosurfacing_3/examples/Isosurfacing_3/dual_contouring.cpp b/Isosurfacing_3/examples/Isosurfacing_3/dual_contouring.cpp index beda605d61b..417e8282f62 100644 --- a/Isosurfacing_3/examples/Isosurfacing_3/dual_contouring.cpp +++ b/Isosurfacing_3/examples/Isosurfacing_3/dual_contouring.cpp @@ -31,7 +31,7 @@ int main(int argc, char** argv) const CGAL::Bbox_3 bbox { -1., -1., -1., 1., 1., 1. }; Grid grid { bbox, CGAL::make_array(30, 30, 30) }; - std::cout << "Bbox: " << grid.bbox() << std::endl; + std::cout << "Span: " << grid.span() << std::endl; std::cout << "Cell dimensions: " << grid.spacing()[0] << " " << grid.spacing()[1] << " " << grid.spacing()[2] << std::endl; std::cout << "Cell #: " << grid.xdim() << ", " << grid.ydim() << ", " << grid.zdim() << std::endl; diff --git a/Isosurfacing_3/examples/Isosurfacing_3/dual_contouring_intersection_oracles.cpp b/Isosurfacing_3/examples/Isosurfacing_3/dual_contouring_intersection_oracles.cpp index c4fff6c84d5..f2878a2b35e 100644 --- a/Isosurfacing_3/examples/Isosurfacing_3/dual_contouring_intersection_oracles.cpp +++ b/Isosurfacing_3/examples/Isosurfacing_3/dual_contouring_intersection_oracles.cpp @@ -49,7 +49,7 @@ int main(int argc, char** argv) const CGAL::Bbox_3 bbox = {-2., -2., -2., 2., 2., 2.}; Grid grid { bbox, CGAL::make_array(50, 50, 50) }; - std::cout << "Bbox: " << grid.bbox() << std::endl; + std::cout << "Span: " << grid.span() << std::endl; std::cout << "Cell dimensions: " << grid.spacing()[0] << " " << grid.spacing()[1] << " " << grid.spacing()[2] << std::endl; std::cout << "Cell #: " << grid.xdim() << ", " << grid.ydim() << ", " << grid.zdim() << std::endl; diff --git a/Isosurfacing_3/examples/Isosurfacing_3/dual_contouring_strategies.cpp b/Isosurfacing_3/examples/Isosurfacing_3/dual_contouring_strategies.cpp index 5976caac6fc..97203d167fb 100644 --- a/Isosurfacing_3/examples/Isosurfacing_3/dual_contouring_strategies.cpp +++ b/Isosurfacing_3/examples/Isosurfacing_3/dual_contouring_strategies.cpp @@ -47,7 +47,7 @@ int main(int argc, char** argv) const CGAL::Bbox_3 bbox = {-2., -2., -2., 2., 2., 2.}; Grid grid { bbox, CGAL::make_array(50, 50, 50) }; - std::cout << "Bbox: " << grid.bbox() << std::endl; + std::cout << "Span: " << grid.span() << std::endl; std::cout << "Cell dimensions: " << grid.spacing()[0] << " " << grid.spacing()[1] << " " << grid.spacing()[2] << std::endl; std::cout << "Cell #: " << grid.xdim() << ", " << grid.ydim() << ", " << grid.zdim() << std::endl; diff --git a/Isosurfacing_3/examples/Isosurfacing_3/marching_cubes.cpp b/Isosurfacing_3/examples/Isosurfacing_3/marching_cubes.cpp index 81a37513162..bda5d00b18a 100644 --- a/Isosurfacing_3/examples/Isosurfacing_3/marching_cubes.cpp +++ b/Isosurfacing_3/examples/Isosurfacing_3/marching_cubes.cpp @@ -29,7 +29,7 @@ int main(int argc, char** argv) const CGAL::Bbox_3 bbox { -1., -1., -1., 1., 1., 1. }; Grid grid { bbox, CGAL::make_array(30, 30, 30) }; - std::cout << "Bbox: " << grid.bbox() << std::endl; + std::cout << "Span: " << grid.span() << std::endl; std::cout << "Cell dimensions: " << grid.spacing()[0] << " " << grid.spacing()[1] << " " << grid.spacing()[2] << std::endl; std::cout << "Cell #: " << grid.xdim() << ", " << grid.ydim() << ", " << grid.zdim() << std::endl; diff --git a/Isosurfacing_3/examples/Isosurfacing_3/marching_cubes_strategies.cpp b/Isosurfacing_3/examples/Isosurfacing_3/marching_cubes_strategies.cpp index 3c879121acc..15487eecb80 100644 --- a/Isosurfacing_3/examples/Isosurfacing_3/marching_cubes_strategies.cpp +++ b/Isosurfacing_3/examples/Isosurfacing_3/marching_cubes_strategies.cpp @@ -30,7 +30,7 @@ int main(int argc, char** argv) const CGAL::Bbox_3 bbox { -1., -1., -1., 1., 1., 1. }; Grid grid { bbox, CGAL::make_array(30, 30, 30) }; - std::cout << "Bbox: " << grid.bbox() << std::endl; + std::cout << "Span: " << grid.span() << std::endl; std::cout << "Cell dimensions: " << grid.spacing()[0] << " " << grid.spacing()[1] << " " << grid.spacing()[2] << std::endl; std::cout << "Cell #: " << grid.xdim() << ", " << grid.ydim() << ", " << grid.zdim() << std::endl; 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 36c24e49a9b..0ca60125ea6 100644 --- a/Isosurfacing_3/include/CGAL/Isosurfacing_3/Cartesian_grid_3.h +++ b/Isosurfacing_3/include/CGAL/Isosurfacing_3/Cartesian_grid_3.h @@ -19,7 +19,6 @@ #include #include -#include #include #include @@ -83,7 +82,7 @@ public: using Iso_cuboid_3 = typename Geom_traits::Iso_cuboid_3; private: - Iso_cuboid_3 m_bbox; + Iso_cuboid_3 m_span; std::array m_sizes; Vector_3 m_spacing; @@ -99,8 +98,8 @@ private: auto vertex = m_gt.construct_vertex_3_object(); // calculate grid spacing - const Point_3& min_p = vertex(m_bbox, 0); - const Point_3& max_p = vertex(m_bbox, 7); + const Point_3& min_p = vertex(m_span, 0); + const Point_3& max_p = vertex(m_span, 7); const FT x_span = x_coord(max_p) - x_coord(min_p); const FT y_span = y_coord(max_p) - y_coord(min_p); const FT z_span = z_coord(max_p) - z_coord(min_p); @@ -117,7 +116,7 @@ public: * \brief Default constructor */ Cartesian_grid_3() - : m_bbox{Point_3{0, 0, 0}, Point_3{0, 0, 0}}, + : m_span{Point_3{0, 0, 0}, Point_3{0, 0, 0}}, m_sizes{2, 2, 2}, m_spacing{0, 0, 0}, m_gt{Geom_traits()} @@ -126,18 +125,18 @@ public: /** * \brief creates a %Cartesian grid with `xdim * ydim * zdim` grid vertices. * - * The grid covers the space described by a bounding box. + * The grid covers the space described by an iso-cuboid. * - * \param bbox the bounding box of the grid + * \param span the geometric span of the grid * \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. */ - Cartesian_grid_3(const Iso_cuboid_3& bbox, + Cartesian_grid_3(const Iso_cuboid_3& span, const std::array& dimensions, const Geom_traits& gt = Geom_traits()) - : m_bbox{bbox}, + : m_span{span}, m_sizes{dimensions}, m_gt{gt} { @@ -147,10 +146,11 @@ public: /** * \brief creates a %Cartesian grid with `xdim * ydim * zdim` grid vertices. * - * The grid covers the space described by a bounding box, itself described through two diagonal corners. + * The grid covers the space described by an iso-cuboid, + * itself described through two diagonal corners. * - * \param p the lowest corner of the bounding box of the grid - * \param q the upper corner of the bounding box of the grid + * \param p the lexicographically smallest corner of the iso-cuboid + * \param q the lexicographically largest corner of the iso-cuboid * \param dimensions the number of grid vertices in the `x`, `y`, and `z` directions * \param gt the geometric traits * @@ -166,18 +166,18 @@ public: /** * \brief creates a %Cartesian grid using a prescribed grid step. * - * The grid covers the space described by a bounding box. + * The grid covers the space described by an iso-cuboid. * - * \param bbox the bounding box of the grid - * \param spacing the dimension of the paving cell, in the `x`, `y`, and `z` directions, respectively. + * \param span the geometric span of the grid + * \param spacing the dimension of the paving cell, in the `x`, `y`, and `z` directions * \param gt the geometric traits * - * \pre the diagonal of `bbox` has length a multiple of `spacing` + * \pre the diagonal of `span` has length a multiple of `spacing` */ - Cartesian_grid_3(const Iso_cuboid_3& bbox, + Cartesian_grid_3(const Iso_cuboid_3& span, const Vector_3& spacing, const Geom_traits& gt = Geom_traits()) - : m_bbox{bbox}, + : m_span{span}, m_spacing{spacing}, m_gt{gt} { @@ -186,8 +186,8 @@ public: auto z_coord = gt.compute_z_3_object(); auto vertex = gt.construct_vertex_3_object(); - const Point_3& min_p = vertex(bbox, 0); - const Point_3& max_p = vertex(bbox, 7); + const Point_3& min_p = vertex(span, 0); + const Point_3& max_p = vertex(span, 7); const FT x_span = x_coord(max_p) - x_coord(min_p); const FT y_span = y_coord(max_p) - y_coord(min_p); const FT z_span = z_coord(max_p) - z_coord(min_p); @@ -200,15 +200,15 @@ public: /** * \brief creates a %Cartesian grid using a prescribed grid step. * - * The grid covers the space described by a bounding box, itself described through two diagonal corners. + * The grid covers the space described by an iso-cuboid, itself described through two diagonal corners. * - * \param p the lowest corner of the bounding box of the grid - * \param q the upper corner of the bounding box of the grid + * \param p the lexicographically smallest corner of the iso-cuboid + * \param q the lexicographically largest corner of the iso-cuboid * \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 the diagonal of the bounding box has length a multiple of `spacing` + * \pre the diagonal of the iso-cuboid has length a multiple of `spacing` */ Cartesian_grid_3(const Point_3& p, const Point_3& q, const Vector_3& spacing, @@ -226,16 +226,16 @@ public: } /** - * returns the bounding box of the %Cartesian grid + * returns an iso-cuboid representing the geometric span of the %Cartesian grid */ - const Iso_cuboid_3& bbox() const { return m_bbox; } + const Iso_cuboid_3& span() const { return m_span; } /** - * sets the bounding box of the %Cartesian grid and recomputes the spacing. + * sets the geometric span of the %Cartesian grid and recomputes the spacing. */ - void set_bbox(const Iso_cuboid_3& bbox) + void set_span(const Iso_cuboid_3& span) { - m_bbox = bbox; + m_span = span; compute_spacing(); } @@ -288,7 +288,7 @@ public: * * \param p the point to be located * - * \pre `p` is inside the bounding box of the grid. + * \pre `p` is inside the grid. */ std::array index(const Point_3& p) const { @@ -297,7 +297,7 @@ public: auto z_coord = m_gt.compute_z_3_object(); auto vertex = m_gt.construct_vertex_3_object(); - const Point_3& min_p = vertex(m_bbox, 0); + const Point_3& min_p = vertex(m_span, 0); std::size_t i = (x_coord(p) - x_coord(min_p)) / m_spacing[0]; std::size_t j = (y_coord(p) - y_coord(min_p)) / m_spacing[1]; std::size_t k = (z_coord(p) - z_coord(min_p)) / m_spacing[2]; @@ -318,7 +318,7 @@ public: * \brief returns the geometric position of the grid vertex described by a set of indices. * * Depending on the value of the template parameter `cache_points`, positions might not be stored - * but calculated using the lowest corner of the bounding box and grid spacing. + * but calculated on-the-fly. * * \param i the index in the `x` direction * \param j the index in the `y` direction @@ -336,7 +336,7 @@ public: typename Geom_traits::Construct_point_3 point = m_gt.construct_point_3_object(); typename Geom_traits::Construct_vertex_3 vertex = m_gt.construct_vertex_3_object(); - const Point_3& min_p = vertex(m_bbox, 0); + const Point_3& min_p = vertex(m_span, 0); return point(x_coord(min_p) + i * m_spacing[0], y_coord(min_p) + j * m_spacing[1], z_coord(min_p) + k * m_spacing[2]); diff --git a/Isosurfacing_3/include/CGAL/Isosurfacing_3/Dual_contouring_domain_3.h b/Isosurfacing_3/include/CGAL/Isosurfacing_3/Dual_contouring_domain_3.h index 50691e0e407..692001e8ac0 100644 --- a/Isosurfacing_3/include/CGAL/Isosurfacing_3/Dual_contouring_domain_3.h +++ b/Isosurfacing_3/include/CGAL/Isosurfacing_3/Dual_contouring_domain_3.h @@ -58,8 +58,8 @@ public: * \brief constructs a domain that can be used with the %Dual Contouring algorithm. * * \param partition the space partitioning data structure - * \param values a continuous field of scalar values, defined over the bounding box of `partition` - * \param gradients a continuous field of normalized vectors, defined over the bounding box of `partition` + * \param values a continuous field of scalar values, defined over the geometric span of `partition` + * \param gradients a continuous field of normalized vectors, defined over the geometric span of `partition` * \param intersection_oracle the oracle for edge-isosurface intersection computation * * \warning the domain class keeps a reference to the `partition`, `values` and `gradients` objects. @@ -84,8 +84,8 @@ public: * \tparam EdgeIntersectionOracle must be a model of `EdgeIntersectionOracle_3` * * \param partition the space partitioning data structure - * \param values a continuous field of scalar values, defined over the bounding box of `partition` - * \param gradients a continuous field of normalized vectors, defined over the bounding box of `partition` + * \param values a continuous field of scalar values, defined over the geometric span of `partition` + * \param gradients a continuous field of normalized vectors, defined over the geometric span of `partition` * \param intersection_oracle the oracle for edge-isosurface intersection computation * * \warning the domain class keeps a reference to the `partition`, `values` and `gradients` objects. diff --git a/Isosurfacing_3/include/CGAL/Isosurfacing_3/IO/Image_3.h b/Isosurfacing_3/include/CGAL/Isosurfacing_3/IO/Image_3.h index 946c0b9aa1f..956c9a3e0aa 100644 --- a/Isosurfacing_3/include/CGAL/Isosurfacing_3/IO/Image_3.h +++ b/Isosurfacing_3/include/CGAL/Isosurfacing_3/IO/Image_3.h @@ -29,7 +29,7 @@ namespace IO { * * \brief creates a grid from a `CGAL::Image_3`. * - * The dimensions and bounding box are read from the image. The values stored + * The dimensions and geometric span are read from the image. The values stored * in the image must be of type `Geom_traits::FT` or implicitly convertible to it. * * \tparam Grid must be `CGAL::Cartesian_grid_3` whose `GeomTraits` is a model of `IsosurfacingTraits_3` @@ -52,18 +52,18 @@ bool read_Image_3(const CGAL::Image_3& image, auto point = grid.geom_traits().construct_point_3_object(); auto iso_cuboid = grid.geom_traits().construct_iso_cuboid_3_object(); - // compute bounding box + // compute span const FT max_x = image.tx() + (image.xdim() - 1) * image.vx(); const FT max_y = image.ty() + (image.ydim() - 1) * image.vy(); const FT max_z = image.tz() + (image.zdim() - 1) * image.vz(); - Iso_cuboid_3 bbox = iso_cuboid(point(image.tx(), image.ty(), image.tz()), + Iso_cuboid_3 span = iso_cuboid(point(image.tx(), image.ty(), image.tz()), point(max_x, max_y, max_z)); // get spacing // std::array spacing = make_array(image.vx(), image.vy(), image.vz()); // get sizes - grid.set_bbox(bbox); + grid.set_span(span); grid.set_sizes(image.xdim(), image.ydim(), image.zdim()); // copy values @@ -133,7 +133,7 @@ CGAL::Image_3 write_Image_3(const Grid& grid, throw std::bad_alloc(); // @todo idk? // set min coordinates - const Point_3& min_p = vertex(grid.bbox(), 0); + const Point_3& min_p = vertex(grid.span(), 0); im->tx = float(CGAL::to_double(x_coord(min_p))); im->ty = float(CGAL::to_double(y_coord(min_p))); im->tz = float(CGAL::to_double(z_coord(min_p))); diff --git a/Isosurfacing_3/include/CGAL/Isosurfacing_3/IO/OBJ.h b/Isosurfacing_3/include/CGAL/Isosurfacing_3/IO/OBJ.h index ebaee9614dc..6bd629b9a25 100644 --- a/Isosurfacing_3/include/CGAL/Isosurfacing_3/IO/OBJ.h +++ b/Isosurfacing_3/include/CGAL/Isosurfacing_3/IO/OBJ.h @@ -55,7 +55,7 @@ bool write_OBJ(std::ostream& out, for(std::size_t y=0; y::max(); // @todo domain.bbox() + x_min = y_min = z_min = std::numeric_limits::max(); // @todo domain.span() x_max = y_max = z_max = std::numeric_limits::lowest(); FT x(0), y(0), z(0); diff --git a/Isosurfacing_3/include/CGAL/Isosurfacing_3/interpolation_schemes_3.h b/Isosurfacing_3/include/CGAL/Isosurfacing_3/interpolation_schemes_3.h index 61220502312..b837dc7ff6f 100644 --- a/Isosurfacing_3/include/CGAL/Isosurfacing_3/interpolation_schemes_3.h +++ b/Isosurfacing_3/include/CGAL/Isosurfacing_3/interpolation_schemes_3.h @@ -49,7 +49,7 @@ public: * * \param p the point at which to interpolate the values * \param g the grid - * \param values the continuous field of scalar values, defined over the bounding box of `g` + * \param values the continuous field of scalar values, defined over the geometric span of `g` */ FT interpolate_values(const Point_3& p, const Grid& g, @@ -61,11 +61,11 @@ public: typename Geom_traits::Construct_vertex_3 vertex = g.geom_traits().construct_vertex_3_object(); // trilinear interpolation of stored values - const Iso_cuboid_3& bbox = g.bbox(); + const Iso_cuboid_3& span = g.span(); const Vector_3& spacing = g.spacing(); // calculate min index including border case - const Point_3& min_p = vertex(bbox, 0); + const Point_3& min_p = vertex(span, 0); std::size_t i = (x_coord(p) - x_coord(min_p)) / x_coord(spacing); std::size_t j = (y_coord(p) - y_coord(min_p)) / y_coord(spacing); std::size_t k = (z_coord(p) - z_coord(min_p)) / z_coord(spacing); @@ -119,7 +119,7 @@ public: * * \param p the point at which to interpolate the gradients * \param g the grid - * \param gradients the continuous field of vector values, defined over the bounding box of `g` + * \param gradients the continuous field of vector values, defined over the geometric span of `g` */ Vector_3 interpolate_gradients(const Point_3& p, const Grid& g, @@ -132,11 +132,11 @@ public: typename Geom_traits::Construct_vertex_3 vertex = g.geom_traits().construct_vertex_3_object(); // trilinear interpolation of stored gradients - const Iso_cuboid_3& bbox = g.bbox(); + const Iso_cuboid_3& span = g.span(); const Vector_3& spacing = g.spacing(); // calculate min index including border case - const Point_3& min_p = vertex(bbox, 0); + const Point_3& min_p = vertex(span, 0); std::size_t i = static_cast((x_coord(p) - x_coord(min_p)) / x_coord(spacing)); std::size_t j = static_cast((y_coord(p) - y_coord(min_p)) / y_coord(spacing)); std::size_t k = static_cast((z_coord(p) - z_coord(min_p)) / z_coord(spacing));