VTK  9.6.20260112
vtkAnnularBinIterator Class Reference

A fast, lightweight class for iterating over the bins of a 2D vtkStaticPointLocator2D. More...

#include <vtkAnnularBinIterator.h>

Public Member Functions

 vtkAnnularBinIterator ()=default
 Construct default iterator.
 
 vtkAnnularBinIterator (vtkStaticPointLocator2D *loc)
 Construct the iterator with a vtkStaticPointLocator2D.
 
void Initialize (vtkStaticPointLocator2D *locator)
 Initialize an iterator with the associated vtkStaticPointLocator2D 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 *circles, vtkDist2TupleArray &results)
 Move to the next bin, returning all points that are inside the circle given by x[2] (specified in Begin()) and associated radius**2, and an optional array of circles.
 
vtkIdType GetBinId ()
 Return the current bin/bucket id of traversal.
 
void GetBin (int IJ[2])
 Return the current bin/bucket index IJ of traversal.
 
double GetMinD2 ()
 Return the minimum distance of the current annulus of bins to the initial starting point x[2].
 

Detailed Description

A fast, lightweight class for iterating over the bins of a 2D vtkStaticPointLocator2D.

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

See also
Note that the vtkStaticPointLocator2D 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.
vtkStaticPointLocator2D vtkVoronoiCore2D
Tests:
vtkAnnularBinIterator (Tests)

Definition at line 59 of file vtkAnnularBinIterator.h.

Constructor & Destructor Documentation

◆ vtkAnnularBinIterator() [1/2]

vtkAnnularBinIterator::vtkAnnularBinIterator ( )
default

Construct default iterator.

◆ vtkAnnularBinIterator() [2/2]

vtkAnnularBinIterator::vtkAnnularBinIterator ( vtkStaticPointLocator2D * loc)
inline

Construct the iterator with a vtkStaticPointLocator2D.

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

Definition at line 72 of file vtkAnnularBinIterator.h.

Member Function Documentation

◆ Initialize()

void vtkAnnularBinIterator::Initialize ( vtkStaticPointLocator2D * locator)
inline

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

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

Definition at line 82 of file vtkAnnularBinIterator.h.

◆ Begin()

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

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

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

Definition at line 89 of file vtkAnnularBinIterator.h.

◆ Next()

bool vtkAnnularBinIterator::Next ( double radius2,
vtkDoubleArray * circles,
vtkDist2TupleArray & results )
inline

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

Definition at line 99 of file vtkAnnularBinIterator.h.

◆ GetBinId()

vtkIdType vtkAnnularBinIterator::GetBinId ( )
inline

Return the current bin/bucket id of traversal.

Definition at line 107 of file vtkAnnularBinIterator.h.

◆ GetBin()

void vtkAnnularBinIterator::GetBin ( int IJ[2])
inline

Return the current bin/bucket index IJ of traversal.

Definition at line 112 of file vtkAnnularBinIterator.h.

◆ GetMinD2()

double vtkAnnularBinIterator::GetMinD2 ( )
inline

Return the minimum distance of the current annulus of bins to the initial starting point x[2].

Definition at line 118 of file vtkAnnularBinIterator.h.


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