VTK  9.6.20260112
vtkShellBinIterator Class Reference

A fast, lightweight class for iterating over the bins of a 3D vtkStaticPointLocator. More...

#include <vtkShellBinIterator.h>

Public Member Functions

 vtkShellBinIterator ()=default
 Construct a default iterator.
 
 vtkShellBinIterator (vtkStaticPointLocator *loc)
 Construct the iterator with a vtkStaticPointLocator.
 
void Initialize (vtkStaticPointLocator *locator)
 Initialize an iterator with the associated vtkStaticPointLocator over which to iterate.
 
bool Begin (vtkIdType ptId, double x[3], vtkDist2TupleArray &results)
 Begin iterating over the bins, starting with point ptId at position x[3].
 
bool Next (double radius2, vtkDoubleArray *spheres, vtkDist2TupleArray &results)
 Move to the next bin, returning all points that are inside the sphere given by x[3] (specified in Begin()) and associated radius**2, and an optional array of spheres.
 
vtkIdType GetBinId ()
 Return the current bin/bucket id of traversal.
 
void GetBin (int IJK[3])
 Return the current bin/bucket index IJK of traversal.
 
double GetMinD2 ()
 Return the minimum distance of the current shell of bins to the initial starting point x[3].
 

Detailed Description

A fast, lightweight class for iterating over the bins of a 3D vtkStaticPointLocator.

vtkShellBinIterator iterates over the bins of a (regular binning) static point locator. Given an initial starting position x[3], it visits the surrounding bins in nested shells, akin to a "spherical" traversal (i.e., in nested, hollow blocks of bins).

See also
Note that the vtkStaticPointLocator class is internally templated, but provides a non-templated API - this is done to ensure that the class can be easily used by interpreted, wrapped languages (e.g., Python). This iterator class follows this pattern.
vtkStaticPointLocator vtkVoronoiCore3D
Tests:
vtkShellBinIterator (Tests)

Definition at line 59 of file vtkShellBinIterator.h.

Constructor & Destructor Documentation

◆ vtkShellBinIterator() [1/2]

vtkShellBinIterator::vtkShellBinIterator ( )
default

Construct a default iterator.

◆ vtkShellBinIterator() [2/2]

vtkShellBinIterator::vtkShellBinIterator ( vtkStaticPointLocator * loc)
inline

Construct the iterator with a vtkStaticPointLocator.

The vtkStaticPointLocator must have invoked BuildLocator() prior to construction of this iterator.

Definition at line 72 of file vtkShellBinIterator.h.

Member Function Documentation

◆ Initialize()

void vtkShellBinIterator::Initialize ( vtkStaticPointLocator * locator)
inline

Initialize an iterator with the associated vtkStaticPointLocator over which to iterate.

The vtkStaticPointLocator must have invoked BuildLocator() prior to initialization of this iterator.

Definition at line 82 of file vtkShellBinIterator.h.

◆ Begin()

bool vtkShellBinIterator::Begin ( vtkIdType ptId,
double x[3],
vtkDist2TupleArray & results )
inline

Begin iterating over the bins, starting with point ptId at position x[3].

Any points in this initial bin are returned in the results array.

Definition at line 89 of file vtkShellBinIterator.h.

◆ Next()

bool vtkShellBinIterator::Next ( double radius2,
vtkDoubleArray * spheres,
vtkDist2TupleArray & results )
inline

Move to the next bin, returning all points that are inside the sphere given by x[3] (specified in Begin()) and associated radius**2, and an optional array of spheres.

Definition at line 99 of file vtkShellBinIterator.h.

◆ GetBinId()

vtkIdType vtkShellBinIterator::GetBinId ( )
inline

Return the current bin/bucket id of traversal.

Definition at line 107 of file vtkShellBinIterator.h.

◆ GetBin()

void vtkShellBinIterator::GetBin ( int IJK[3])
inline

Return the current bin/bucket index IJK of traversal.

Definition at line 112 of file vtkShellBinIterator.h.

◆ GetMinD2()

double vtkShellBinIterator::GetMinD2 ( )
inline

Return the minimum distance of the current shell of bins to the initial starting point x[3].

Definition at line 118 of file vtkShellBinIterator.h.


The documentation for this class was generated from the following file: