46 #ifndef vtkVoronoiTile_h
47 #define vtkVoronoiTile_h
50 #include "vtkFiltersMeshingModule.h"
56 VTK_ABI_NAMESPACE_BEGIN
106 , PruneTolerance(1.0e-13)
107 , RecomputeCircumFlower(
true)
108 , RecomputePetals(
true)
114 this->Points.reserve(256);
115 this->NewPoints.reserve(256);
118 this->SortP.reserve(256);
120 this->Petals->SetNumberOfComponents(3);
121 this->Petals->ReserveValues(256);
131 , PruneTolerance(1.0e-13)
132 , RecomputeCircumFlower(
true)
133 , RecomputePetals(
true)
139 this->Points.reserve(256);
140 this->NewPoints.reserve(256);
143 this->SortP.reserve(256);
145 this->Petals->SetNumberOfComponents(3);
146 this->Petals->ReserveTuples(256);
156 void Initialize(
vtkIdType genPtId,
const double genPt[3],
double bds[4]);
183 if (this->RecomputeCircumFlower)
185 this->ComputeCircumFlower();
187 return this->CircumFlower2;
193 if (this->RecomputeCircumFlower)
195 this->ComputeCircumFlower();
197 return (r2 <= this->CircumFlower2);
199 bool InFlower(
const double x[2]);
200 void UpdatePetals(
double cf2);
203 if (this->RecomputePetals)
205 this->UpdatePetals(this->CircumFlower2);
207 return (this->Petals->GetNumberOfTuples() > 0 ? this->Petals :
nullptr);
247 if (itr == (this->Points.end() - 1))
249 return this->Points.begin();
263 void ComputeCircumFlower();
284 for (
const auto& p : this->
Points)
298 for (
const auto& p : this->
Points)
311 VTK_ABI_NAMESPACE_END
vtkVoronoiTile(const vtkVoronoiTile &)
vtkSMPTools require a proper operator= and copy constructor.
implicit function for a set of spheres
vtkIdType GetNumberOfPoints()
static double Distance2BetweenPoints2D(const double p1[2], const double p2[2])
Compute distance squared between two 2D points p1 and p2.
double * GetGeneratorPosition()
std::vector< vtkTilePoint > PointRingType
bool InCircumFlower(double r2)
bool RecomputeCircumFlower
void ProducePolyData(vtkPolyData *pd)
concrete dataset represents vertices, lines, polygons, and triangle strips
static vtkSmartPointer< T > New()
Create an instance of a VTK object.
dynamic, self-adjusting array of double
The convex polygon tile class proper.
double GetCircumFlower2()
Methods to determine whether a point x[2] is within the Voronoi flower, or Voronoi circumflower...
vtkSmartPointer< vtkDoubleArray > Petals
std::vector< vtkTilePoint >::iterator PointRingIterator
vtkVoronoiTile()
Constructor.
vtkIdType GetGeneratorPointId()
Obtain information about the generated tile.
bool InFlower(const double x[2])
PointRingIterator Next(PointRingIterator &itr)
std::vector< vtkTilePoint * > SortP
ClipIntersectionStatus
Classes, structs, and typedefs in support of Voronoi processing.
vtkDoubleArray * GetPetals()
const PointRingType & GetPoints()
void ComputeCircumFlower()
represent and manipulate 3D points
vtkVoronoiTile & operator=(const vtkVoronoiTile &)
vtkTilePoint(double tileX[2], double x[2], vtkIdType neiId)