Misc minor doc / code fixes

This commit is contained in:
Mael Rouxel-Labbé 2024-01-22 13:36:02 +01:00
parent ddacceb7a7
commit 449a5dc111
5 changed files with 18 additions and 26 deletions

View File

@ -145,43 +145,28 @@ public:
/**
* \return the number of grid vertices in the `x` direction
*/
std::size_t xdim() const
{
return m_sizes[0];
}
std::size_t xdim() const { return m_sizes[0]; }
/**
* \return the number of grid vertices in the `y` direction
*/
std::size_t ydim() const
{
return m_sizes[1];
}
std::size_t ydim() const { return m_sizes[1]; }
/**
* \return the number of grid vertices in the `z` direction
*/
std::size_t zdim() const
{
return m_sizes[2];
}
std::size_t zdim() const { return m_sizes[2]; }
/**
* \return the bounding box of the %Cartesian grid.
*/
const Bbox_3& bbox() const
{
return m_bbox;
}
const Bbox_3& bbox() const { return m_bbox; }
/**
* \return the spacing of the %Cartesian grid, that is a vector whose coordinates are
* the grid steps in the `x`, `y`, and `z` directions, respectively
*/
const std::array<FT, 3>& spacing() const
{
return m_spacing;
}
const std::array<FT, 3>& spacing() const { return m_spacing; }
/**
* \brief gets the geometric position of the grid vertex described by a set of indices.

View File

@ -26,14 +26,17 @@ namespace Isosurfacing {
/**
* \ingroup IS_Domains_grp
*
* \cgalModels{IsosurfacingDomainWithGradient_3}
* \cgalModels{IsosurfacingDomain_3,IsosurfacingDomainWithGradient_3}
*
* \brief A domain that represents an explicitly stored %Cartesian grid.
*
* \warning The domain keeps a pointer to the `grid` object, hence users must ensure that
* the lifetime of the `grid` object exceeds that of the object returned by this function.
*
* \tparam Grid must be a `CGAL::Isosurfacing::Cartesian_grid_3` whose `GeomTraits` template parameter
* is a model of `IsosurfacingTraits_3`.
* \tparam Gradient the type of the gradient functor. It must be a model of `CopyConstructible`
* and implement `GeomTraits::Vector_3 operator()(const GeomTraits::Point_3& point) const`.
* and implement `%Grid::GeomTraits::Vector_3 operator()(const %Grid::GeomTraits::Point_3& point) const`.
*
* \sa `CGAL::Isosurfacing::create_explicit_Cartesian_grid_domain()`
*/
@ -84,7 +87,7 @@ public:
* \tparam Grid must be a `CGAL::Isosurfacing::Cartesian_grid_3` whose `GeomTraits` template parameter
* is a model of `IsosurfacingTraits_3`.
* \tparam Gradient the type of the gradient functor. It must be a model of `CopyConstructible`
* and implement `GeomTraits::Vector_3 operator()(const GeomTraits::Point_3& point) const`.
* and implement `%Grid::Geom_traits::Vector_3 operator()(const GeomTraits::Point_3& point) const
*
* \param grid the %Cartesian grid containing input data
* \param gradient a function giving the value of the gradient of the implicit function at each discretization point

View File

@ -29,7 +29,7 @@ namespace Isosurfacing {
/**
* \ingroup IS_Domains_grp
*
* \cgalModels{IsosurfacingDomainWithGradient_3}
* \cgalModels{IsosurfacingDomain_3,IsosurfacingDomainWithGradient_3}
*
* \brief A domain that represents a %Cartesian grid that discretizes an implicit function.
*

View File

@ -16,6 +16,8 @@
#include <CGAL/Isosurfacing_3/internal/Cell_type.h>
#include <CGAL/Isosurfacing_3/internal/tables.h>
#include <CGAL/assertions.h>
#include <CGAL/tags.h>
#ifdef CGAL_LINKED_WITH_TBB
@ -60,7 +62,9 @@ public:
: size_i{size_i},
size_j{size_j},
size_k{size_k}
{ }
{
CGAL_precondition(size_i > 0 && size_j > 0 && size_k > 0);
}
// gets a container with the two vertices incident to edge e
Vertices_incident_to_edge incident_vertices(const Edge_descriptor& e) const

View File

@ -23,7 +23,7 @@ using Grid = CGAL::Isosurfacing::Cartesian_grid_3<Kernel>;
using Point_range = std::vector<Point>;
using Polygon_range = std::vector<std::vector<std::size_t> >;
int main(int, char**)
int main(int argc, char** argv)
{
const Vector spacing(0.002, 0.002, 0.02);
const CGAL::Bbox_3 bbox = {-1, -1, -1, 1, 1, 1};