CGAL 5.3 - 3D Periodic Mesh Generation
|
#include <CGAL/Periodic_3_function_wrapper.h>
The class Periodic_3_function_wrapper
is a helper class designed to wrap an (a priori non-periodic) implicit function describing a domain through the relationship [p
is inside if f(p)<0
] and defined over the canonical cube to a function defined over the whole Euclidean space and periodic, with the same period as the canonical cube.
More precisely, if f
is the real function defined either over \( \mathbb R^3\) or over the canonical cube, we construct the periodic real function \( f^{\ast} \) defined over \( \mathbb R^3\) as follows:
For example, if considering the unit cube as canonical cube, an oracle answering a query such as "what is the value of the implicit function at this point?" at the point (2.5, 2.5, 2.5)
will be in fact evaluated at the canonical representative, that is (0.5, 0.5, 0.5)
. Consequently, it is then not required to provide an input domain that is defined over the whole space or periodic, but only defined over the canonical cube.
In practice, the implicit function provided by the user is likely defined over a larger domain than the canonical cube (in general, it is \( \mathbb R^3\)). Note that – when constructing artificially periodic functions – all the values of the implicit function for points outside this canonical cube are unused since queries are always answered by looking at the canonical representative. Figure 60.2 gives an example of such domain where some information is discarded.
Note also that when constructing artificially periodic functions, it is the responsability of the user to provide an input function that is compatible with the canonical cube (that is, whose isovalues are periodically continuous and without intersections). Figure 60.3 is an example of a bad choice of input function and canonical cube: there is no continuity of the isovalues at the border of the canonical cube. In such configuration, the mesher might or might not finish and the result is likely to be non-manifold and to contain self-intersections.
Function | provides the definition of the function. This parameter stands for a model of the concept ImplicitFunction described in the surface mesh generation package. The number types Function::FT and BGT::FT are required to match. |
BGT | is 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 . |
Types | |
typedef BGT::FT | FT |
typedef BGT::Point_3 | Point_3 |
typedef BGT::Iso_cuboid_3 | Iso_cuboid_3 |
Creation | |
Periodic_3_function_wrapper (Function f, const Iso_cuboid_3 &domain) | |
Construction from an implicit function and the canonical cube. | |
Operations | |
FT | operator() (const Point_3 &p) const |
Evaluates the function \( f \) passed in input at the canonical representative of \( p \). | |