pub struct vtkStaticPointLocator2D(/* private fields */);Expand description
quickly locate points in 2-space
vtkStaticPointLocator2D is a spatial search object to quickly locate points in 2D. vtkStaticPointLocator2D works by dividing a specified region of space into a regular array of rectilinear buckets, and then keeping a list of points that lie in each bucket. Typical operation involves giving a position in 2D and finding the closest point; or finding the N closest points. (Note that the more general vtkStaticPointLocator is available for 3D operations.) Other specialized methods for 2D have also been provided.
vtkStaticPointLocator2D is an accelerated version of vtkPointLocator. It is threaded (via vtkSMPTools), and supports one-time static construction (i.e., incremental point insertion is not supported). If you need to incrementally insert points, use the vtkPointLocator or its kin to do so.
Note that to satisfy the superclass’s API, methods often assume a 3D point is provided. However, only the x,y values are used for processing. The z-value is only used to define location of the 2D plane.
@warning This class is templated. It may run slower than serial execution if the code is not optimized during compilation. Build in Release or ReleaseWithDebugInfo.
@warning Make sure that you review the documentation for the superclasses vtkAbstactPointLocator and vtkLocator. In particular the Automatic data member can be used to automatically determine divisions based on the average number of points per bucket.
@warning Other types of spatial locators have been developed such as octrees and kd-trees. These are often more efficient for the operations described here.
@sa vtkStaticPointLocator vtkPointLocator vtkCellLocator vtkLocator vtkAbstractPointLocator
Implementations§
Source§impl vtkStaticPointLocator2D
impl vtkStaticPointLocator2D
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new vtkStaticPointLocator2D wrapped inside vtkNew