\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.6.1 - 3D Mesh Generation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
CGAL::Labeled_mesh_domain_3< LabelingFunction, BGT > Class Template Reference

#include <CGAL/Labeled_mesh_domain_3.h>

Definition

The class Labeled_mesh_domain_3 implements indexed domains.

This class is a model of concept MeshDomain_3.

Any boundary facet is labeled <a,b>, a<b, where a and b are the tags of its incident subdomain. Thus, a boundary facet of the domain is labeled <0,b>, where b!=0.

This class includes a function that provides, the subdomain index of any query point. An intersection between a segment and bounding surfaces is detected when both segment endpoints are associated with different values of subdomain indices. The intersection is then constructed by bisection. The bisection stops when the query segment is shorter than an error bound e given by the product of the length of the diagonal of the bounding box (in world coordinates), or the radius of the bounding sphere, and a relative error bound passed as argument to the constructor of Labeled_mesh_domain_3.

Implicit_mesh_domain_3 is a heir of Labeled_mesh_domain_3. It uses a satisfying labeling function if there is only one component to mesh.

Template Parameters
LabelingFunctionis the type of the input function.
This parameter stands for a model of the concept ImplicitFunction described in the surface mesh generation package.
Labeling function f must return 0 if the point isn't located in any subdomain. Usually, the return type of labeling functions are integer.
Let p be a Point.
  • f(p)=0 means that p is outside domain.
  • f(p)=a, a!=0 means that p is inside subdomain a.
Implicit_multi_domain_to_labeling_function_wrapper is a good candidate for this template parameter if there are several components to mesh.
BGTis a geometric traits class that provides the basic operations to implement intersection tests and intersection computations through a bisection method. This parameter must be instantiated with a model of the concept BisectionGeometricTraits_3.
Is Model Of:
MeshDomain_3
See Also
Implicit_mesh_domain_3
Implicit_multi_domain_to_labeling_function_wrapper
CGAL::make_mesh_3().
Examples:
Mesh_3/mesh_implicit_domains.cpp, Mesh_3/mesh_implicit_domains_2.cpp, Mesh_3/mesh_polyhedral_edge_tolerance_region.cpp, Mesh_3/mesh_polyhedral_implicit_function.cpp, and Mesh_3/mesh_polyhedral_surface_tolerance_region.cpp.

Creation

 Labeled_mesh_domain_3 (const LabelingFunction &f, const Sphere_3 &bounding_sphere, const FT &relative_error_bound=FT(1e-3))
 Construction from a labeling function, a bounding Sphere and a relative error bound. More...
 
 Labeled_mesh_domain_3 (const LabelingFunction &f, const Bbox_3 &bbox, const FT &relative_error_bound=FT(1e-3))
 Construction from a labeling function, a bounding box and a relative error bound. More...
 
 Labeled_mesh_domain_3 (const LabelingFunction &f, const Iso_cuboid_3 &bbox, const FT &relative_error_bound=FT(1e-3))
 Construction from a function, a bounding Iso_cuboid_3 and a relative error bound. More...
 

Constructor & Destructor Documentation

template<class LabelingFunction , class BGT >
CGAL::Labeled_mesh_domain_3< LabelingFunction, BGT >::Labeled_mesh_domain_3 ( const LabelingFunction &  f,
const Sphere_3 bounding_sphere,
const FT &  relative_error_bound = FT(1e-3) 
)

Construction from a labeling function, a bounding Sphere and a relative error bound.

Parameters
fthe labeling function.
bounding_spherethe bounding sphere of the meshable space.
relative_error_boundis the relative error bound used to compute intersection points between the implicit surface and query segments. The bisection is stopped when the length of the intersected segment is less than the product of relative_error_bound by the radius of bounding_sphere.
template<class LabelingFunction , class BGT >
CGAL::Labeled_mesh_domain_3< LabelingFunction, BGT >::Labeled_mesh_domain_3 ( const LabelingFunction &  f,
const Bbox_3 bbox,
const FT &  relative_error_bound = FT(1e-3) 
)

Construction from a labeling function, a bounding box and a relative error bound.

Parameters
fthe labeling function.
bboxthe bounding box of the meshable space.
relative_error_boundis the relative error bound used to compute intersection points between the implicit surface and query segments. The bisection is stopped when the length of the intersected segment is less than the product of relative_error_bound by the diagonal of bounding_box.
template<class LabelingFunction , class BGT >
CGAL::Labeled_mesh_domain_3< LabelingFunction, BGT >::Labeled_mesh_domain_3 ( const LabelingFunction &  f,
const Iso_cuboid_3 bbox,
const FT &  relative_error_bound = FT(1e-3) 
)

Construction from a function, a bounding Iso_cuboid_3 and a relative error bound.

Parameters
fthe function.
bboxthe bounding box of the meshable space.
relative_error_boundis the relative error bound used to compute intersection points between the implicit surface and query segments. The bisection is stopped when the length of the intersected segment is less than the product of relative_error_bound by the diagonal of bounding_box.