|
Geogram Version 1.9.7
A programming library of geometric algorithms
|
Constructs a polyhedral mesh from a restricted Voronoi diagram. More...
#include <geogram/voronoi/RVD_callback.h>
Public Member Functions | |
| BuildRVDMesh (Mesh &output_mesh) | |
| BuildRVDMesh constructor. | |
| ~BuildRVDMesh () override | |
| BuildRVDMesh destructor. | |
| void | set_generate_ids (bool x) |
| Specifies whether ids should be generated. | |
| void | set_shrink (double x) |
| Defines the optional shrink factor for cells. | |
| void | begin () override |
| Called at the beginning of RVD traversal. | |
| void | end () override |
| Called at the end of RVD traversal. | |
| void | begin_polyhedron (index_t seed, index_t tetrahedron) override |
| Called at the beginning of each RVD polyhedron. | |
| void | begin_facet (index_t facet_seed, index_t facet_tet_facet) override |
| Called at the beginning of each facet of each intersection polyhedron. | |
| void | vertex (const double *geometry, const GEOGen::SymbolicVertex &symb) override |
| Called for each vertex of the current facet. | |
| void | end_facet () override |
| Called at the end of each polyhedron facet. | |
| void | end_polyhedron () override |
| Called at the end of each polyhedron. | |
| void | process_polyhedron_mesh () override |
| If use_mesh is set, then this function is called for each generated mesh. | |
Public Member Functions inherited from GEO::RVDPolyhedronCallback | |
| RVDPolyhedronCallback () | |
| PolyhedronCallback constructor. | |
| ~RVDPolyhedronCallback () override | |
| PolyhedronCallback destructor. | |
| void | begin () override |
| Called at the beginning of the RVD traversal. | |
| void | end () override |
| Called at the end of the RVD traversal. | |
| virtual void | operator() (index_t v, index_t t, const GEOGen::ConvexCell &C) const |
| The default callback called for each polyhedron. | |
| index_t | tet () const |
| Gets the index of the tetrahedron that corresponds to the current polyhedron. | |
| index_t | facet_seed () const |
| Gets the index of the seed that defines the bisector on which the current facet lies, or index_t(-1). | |
| index_t | facet_tet () const |
| Gets the index of the tetrahedron adjacent to the current facet or index_t(-1) if there is no such facet. | |
| void | set_simplify_internal_tet_facets (bool x) |
| Specifies whether internal tetrahedron facets should be removed. | |
| void | set_simplify_voronoi_facets (bool x) |
| Specifies whether Voronoi facets should be simplified. | |
| void | set_simplify_boundary_facets (bool x, double angle_threshold=45.0) |
| Specifies whether boundary facets should be simplified. | |
| void | set_tessellate_non_convex_facets (bool x) |
| Specifies whether non-convex facets should be tessellated. | |
| void | set_use_mesh (bool x) |
| Specifies whether a mesh should be built for each traversed polyhedron. | |
| void | set_dimension (index_t dim) |
| Sets the dimension of the internal mesh if need be. | |
Public Member Functions inherited from GEO::RVDCallback | |
| RVDCallback () | |
| RVDCallback constructor. | |
| virtual | ~RVDCallback () |
| RVDCallback destructor. | |
| index_t | seed () const |
| Gets the index of the seed that corresponds to the current polygon/polyhedron. | |
| index_t | simplex () const |
| Gets the index of the simplex that corresponds to the current polygon/polyhedron. | |
| void | set_spinlocks (Process::SpinLockArray *spinlocks) |
| Sets the spinlocks array. | |
Additional Inherited Members | |
Protected Member Functions inherited from GEO::RVDPolyhedronCallback | |
| virtual void | begin_polyhedron_internal (index_t seed, index_t tetrahedron) |
| Filters callbacks between operator() and client callbacks. | |
| virtual void | begin_facet_internal (index_t facet_seed, index_t facet_tet) |
| Filters callbacks between operator() and client callbacks. | |
| virtual void | vertex_internal (const double *geometry, const GEOGen::SymbolicVertex &symb) |
| Filters callbacks between operator() and client callbacks. | |
| virtual void | end_facet_internal () |
| Filters callbacks between operator() and client callbacks. | |
| virtual void | end_polyhedron_internal () |
| Filters callbacks between operator() and client callbacks. | |
Protected Attributes inherited from GEO::RVDPolyhedronCallback | |
| index_t | facet_seed_ |
| index_t | facet_tet_ |
| index_t | last_seed_ |
| bool | simplify_internal_tet_facets_ |
| bool | simplify_voronoi_facets_ |
| bool | simplify_boundary_facets_ |
| double | simplify_boundary_facets_angle_threshold_ |
| bool | tessellate_non_convex_facets_ |
| bool | use_mesh_ |
| bool | facet_is_skipped_ |
| Mesh | mesh_ |
| Attribute< GEOGen::SymbolicVertex > | mesh_vertex_sym_ |
| Attribute< index_t > | mesh_facet_seed_ |
| Attribute< index_t > | mesh_facet_tet_ |
| RVDVertexMap * | vertex_map_ |
| vector< index_t > | base_current_facet_ |
Protected Attributes inherited from GEO::RVDCallback | |
| index_t | seed_ |
| index_t | simplex_ |
| Process::SpinLockArray * | spinlocks_ |
Constructs a polyhedral mesh from a restricted Voronoi diagram.
Its member functions are called for each RVD polyhedron, i.e. the intersections between the volumetric mesh tetrahedra and the Voronoi cells. Based on set_simplify_xxx(), a smaller number of polyhedra can be generated.
Definition at line 505 of file RVD_callback.h.
| GEO::BuildRVDMesh::BuildRVDMesh | ( | Mesh & | output_mesh | ) |
BuildRVDMesh constructor.
| [out] | output_mesh | a reference to the generated mesh |
|
overridevirtual |
Called at the beginning of RVD traversal.
Reimplemented from GEO::RVDCallback.
Called at the beginning of each facet of each intersection polyhedron.
A facet can be a subset of either a bisector (defined by two seeds), or it can be a subset of a facet of a tetrahedron.
| [in] | facet_seed | if the facet corresponds to a bisector, the index of the seed that defines the bisector, or index_t(-1) otherwise |
| [in] | facet_tet | if the facet corresponds to a facet of the current tetrahedron, the index of the tetrahedron adjacent to that facet, or index_t(-1) otherwise |
Reimplemented from GEO::RVDPolyhedronCallback.
Called at the beginning of each RVD polyhedron.
| [in] | seed,tetrahedron | the (seed,tetrahedron) pair that defines the RVD polyhedron, as the intersection between the Voronoi cell of the seed and the tetrahedron. |
Reimplemented from GEO::RVDPolyhedronCallback.
|
overridevirtual |
Called at the end of RVD traversal.
Reimplemented from GEO::RVDCallback.
|
overridevirtual |
Called at the end of each polyhedron facet.
Reimplemented from GEO::RVDPolyhedronCallback.
|
overridevirtual |
Called at the end of each polyhedron.
Reimplemented from GEO::RVDPolyhedronCallback.
|
overridevirtual |
If use_mesh is set, then this function is called for each generated mesh.
Default implementation simplifies the mesh based on sipmlify_xxx flags, then it calls user callbacks begin_facet(), end_facet(), vertex() for each facet of the mesh, as well as begin_polyhedron() and end_polyhedron() once per mesh. Derived classes may modify (e.g., simplify) the mesh before calling user callbacks.
Reimplemented from GEO::RVDPolyhedronCallback.
| void GEO::BuildRVDMesh::set_generate_ids | ( | bool | x | ) |
Specifies whether ids should be generated.
If enabled, unique vertex ids, seed ids and cell ids are generated and attached to the mesh vertices ("vertex_id" attribute) and mesh facets ("seed_id" and "cell_id" attributes) respectively. There is a cell_id per generated polyhedron, and seed_id refers to the Voronoi seed (the point that the Voronoi cell is associated with).
| [in] | x | true if ids should be generated, false otherwise (default) |
| void GEO::BuildRVDMesh::set_shrink | ( | double | x | ) |
Defines the optional shrink factor for cells.
| [in] | x | shrink factor, 0.0 means no shrink, 1.0 means maximum shrink (cell reduced to a point). |
|
overridevirtual |
Called for each vertex of the current facet.
| [in] | geometry | a pointer to the coordinates of the vertex |
| [in] | symb | the symbolic representation of the vertex |
Reimplemented from GEO::RVDPolyhedronCallback.