|
VTK
9.7.20261016
|
#include <vtkVoronoiCore.h>
Iterate over the neighbors of a Voronoi generator in spherical shells (the annuli of a 2D tile), with any point locator, of dimension DIM (2 or 3).
BuildHull() (or BuildTile()) requests batches of points around a generator, nearest first, until it can prove that no point not yet returned can modify the hull. The first batch is the shell of vtkAbstractPointLocator::FindNPointsInShell(), which holds the nearest points, and the next ones are the shells of FindPointsInShell(), which grow geometrically, up to the circumflower. Next() can cull the shells with the petals of the Voronoi flower, spheres (x, y, z, r^2) in 3D, or circles (x, y, r^2) in 2D: the points outside of all of them are skipped. Used by both vtkVoronoiCore3D (DIM = 3) and vtkVoronoiCore2D (DIM = 2).
The petals have DIM + 1 components, which the locator expects when it is of dimension DIM: that of vtkStaticPointLocator is 3, that of vtkStaticPointLocator2D is 2, and that of vtkKdTreePointLocator is 2 if its points are in a plane of constant z and 3 otherwise. When the dimension of the locator is not DIM, the petals are not used (see IsLocatorSuited()).
Definition at line 589 of file vtkVoronoiCore.h.
Public Member Functions | |
| void | Initialize (vtkAbstractPointLocator *loc, int firstShellSize=0) |
| bool | Begin (vtkIdType ptId, double x[3], vtkDist2TupleArray &results) |
| bool | Next (double radius2, vtkDoubleArray *petals, vtkDist2TupleArray &results) |
| double | GetMinD2 () const |
Static Public Member Functions | |
| static int | GetLocatorDimension (vtkAbstractPointLocator *loc) |
| static bool | IsLocatorSuited (vtkAbstractPointLocator *loc) |
Public Attributes | |
| vtkAbstractPointLocator * | Locator = nullptr |
| int | FirstShellSize = 16 |
| vtkIdType | PtId = -1 |
| double | X [3] = { 0.0, 0.0, 0.0 } |
| double | MinD2 = 0.0 |
| bool | Done = false |
| bool | UsePetals = true |
Static Public Attributes | |
| static constexpr double | ShellGrowth2 = 2.0 |
| static constexpr std::size_t | MaxSortedShellSize = 128 |
|
inlinestatic |
Definition at line 613 of file vtkVoronoiCore.h.
|
inlinestatic |
Definition at line 633 of file vtkVoronoiCore.h.
|
inline |
Definition at line 642 of file vtkVoronoiCore.h.
|
inline |
Definition at line 650 of file vtkVoronoiCore.h.
|
inline |
Definition at line 676 of file vtkVoronoiCore.h.
|
inline |
Definition at line 694 of file vtkVoronoiCore.h.
|
staticconstexpr |
Definition at line 595 of file vtkVoronoiCore.h.
|
staticconstexpr |
Definition at line 601 of file vtkVoronoiCore.h.
| vtkAbstractPointLocator* vtkVoronoiNeighborIterator< DIM >::Locator = nullptr |
Definition at line 603 of file vtkVoronoiCore.h.
| int vtkVoronoiNeighborIterator< DIM >::FirstShellSize = 16 |
Definition at line 604 of file vtkVoronoiCore.h.
| vtkIdType vtkVoronoiNeighborIterator< DIM >::PtId = -1 |
Definition at line 605 of file vtkVoronoiCore.h.
| double vtkVoronoiNeighborIterator< DIM >::X[3] = { 0.0, 0.0, 0.0 } |
Definition at line 606 of file vtkVoronoiCore.h.
| double vtkVoronoiNeighborIterator< DIM >::MinD2 = 0.0 |
Definition at line 607 of file vtkVoronoiCore.h.
| bool vtkVoronoiNeighborIterator< DIM >::Done = false |
Definition at line 608 of file vtkVoronoiCore.h.
| bool vtkVoronoiNeighborIterator< DIM >::UsePetals = true |
Definition at line 609 of file vtkVoronoiCore.h.