CGAL 6.1 - 3D Isosurfacing

Loading...
Searching...
No Matches
Functions
Isosurfacing Methods
Reference Manual

##

## Functions
template<typename ConcurrencyTag = CGAL::Sequential_tag, typename Domain , typename PointRange , typename PolygonRange , typename NamedParameters = parameters::Default_named_parameters>
void | CGAL::Isosurfacing::dual_contouring (const Domain &domain, const typename Domain::Geom_traits::FT isovalue, PointRange &points, PolygonRange &polygons, const NamedParameters &np=parameters::default_values())
| creates a polygon soup that discretizes an isosurface using the Dual Contouring algorithm.
template<typename ConcurrencyTag = CGAL::Sequential_tag, typename Domain , typename PointRange , typename TriangleRange , typename NamedParameters = parameters::Default_named_parameters>
void | CGAL::Isosurfacing::marching_cubes (const Domain &domain, const typename Domain::Geom_traits::FT isovalue, PointRange &points, TriangleRange &triangles, const NamedParameters &np=parameters::default_values())
| creates a triangle soup that represents an isosurface generated by the Marching Cubes algorithm.

## Function Documentation

## ◆ dual_contouring()

template<typename ConcurrencyTag = CGAL::Sequential_tag, typename Domain , typename PointRange , typename PolygonRange , typename NamedParameters = parameters::Default_named_parameters>

void CGAL::Isosurfacing::dual_contouring | ( | const Domain & | domain,
|  | const typename Domain::Geom_traits::FT | isovalue,
|  | PointRange & | points,
|  | PolygonRange & | polygons,
|  | const NamedParameters & | np = `parameters::default_values()`
| ) |  |

`#include <CGAL/Isosurfacing_3/dual_contouring_3.h>`

creates a polygon soup that discretizes an isosurface using the Dual Contouring algorithm.

The point placement strategy within each cell of the space partition is based on Quadric Error Metrics ("QEM", or "QEF" in Dual Contouring-related works).

Template Parameters

  ConcurrencyTag | enables sequential versus parallel algorithm. Possible values are `Sequential_tag`, `Parallel_if_available_tag`, or `Parallel_tag`.
  Domain | must be a model of `IsosurfacingDomainWithGradient_3`.
  PointRange | must be a model of the concept `AssociativeContainer` whose value type can be constructed from the point type of the domain.
  PolygonRange | must be a model of the concepts `RandomAccessContainer` and `BackInsertionSequence` whose value type is itself a model of the concepts `RandomAccessContainer` and `BackInsertionSequence` whose value type is `std::size_t`.
  NamedParameters | a sequence of Named Parameters

Parameters

  domain | the domain providing the spatial partition and the values and gradient data
  isovalue | the value defining the isosurface
  points | the points of the polygons in the output polygon soup
  polygons | the faces of the output polygon soup. Each element in the vector describes a polygon (either quads or triangles, see the named parameter `do_not_triangulate_faces`) using the indices of the points in `points`.
  np | optional Named Parameters described below

Optional Named Parameters

  whether to constrain the vertex location to the geometrical space of its cell Type: Boolean Default: `false` Extra: Constraining the vertex to its dual cell guarantees that the resulting surface is without self-intersections (non-manifoldness aside). Oppositely, an unconstrained positioning strategy might produce better looking surfaces near sharp features (ridges, corners), at the cost of possible self-intersections. |
  If `true`, the output will contain quadrilaterals. If `false`, the output will contain triangles. Type: Boolean Default: `false` (faces are triangulated) Extra: Triangulating faces is done by inserting the intersection between an edge and the isosurface, and linking it to the dual points of the cells incident to the edge. If `constrain_to_cell` is set to `false`, triangulation faces can result in additional self-intersections. An alternative that has worse approximation but is less likely to produce self-intersections is to use the function `CGAL::Polygon_mesh_processing::triangulate_faces()`. |

See also
  `CGAL::Polygon_mesh_processing::polygon_soup_to_polygon_mesh()`

## ◆ marching_cubes()

template<typename ConcurrencyTag = CGAL::Sequential_tag, typename Domain , typename PointRange , typename TriangleRange , typename NamedParameters = parameters::Default_named_parameters>

void CGAL::Isosurfacing::marching_cubes | ( | const Domain & | domain,
|  | const typename Domain::Geom_traits::FT | isovalue,
|  | PointRange & | points,
|  | TriangleRange & | triangles,
|  | const NamedParameters & | np = `parameters::default_values()`
| ) |  |

`#include <CGAL/Isosurfacing_3/marching_cubes_3.h>`

creates a triangle soup that represents an isosurface generated by the Marching Cubes algorithm.

Template Parameters

  ConcurrencyTag | enables sequential versus parallel algorithm. Possible values are `Sequential_tag`, `Parallel_if_available_tag`, or `Parallel_tag`.
  Domain | must be a model of `IsosurfacingDomain_3`.
  PointRange | must be a model of the concepts `RandomAccessContainer` and `BackInsertionSequence` whose value type can be constructed from the point type of the domain.
  TriangleRange | must be a model of the concepts `RandomAccessContainer` and `BackInsertionSequence` whose value type is itself a model of the concepts `RandomAccessContainer` and `BackInsertionSequence` whose value type is `std::size_t`.
  NamedParameters | a sequence of Named Parameters

Parameters

  domain | the domain providing the spatial partition and the data
  isovalue | the value defining the isosurface
  points | the points of the triangles in the output triangle soup
  triangles | the faces of the output triangle soup. Each element in the vector describes a triangle using the indices of the points in `points`.
  np | an optional sequence of Named Parameters among the ones listed below

Optional Named Parameters

  whether the topologically correct variant of Marching Cubes [4] should be used, or the base version [1]. Type: Boolean Default: `true` |

See also
  `CGAL::Polygon_mesh_processing::polygon_soup_to_polygon_mesh()`