VTK  9.0.20210409
vtkKdTreePointLocator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkKdTreePointLocator.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
26 #ifndef vtkKdTreePointLocator_h
27 #define vtkKdTreePointLocator_h
28 
30 #include "vtkCommonDataModelModule.h" // For export macro
31 
32 class vtkIdList;
33 class vtkKdTree;
34 
35 class VTKCOMMONDATAMODEL_EXPORT vtkKdTreePointLocator : public vtkAbstractPointLocator
36 {
37 public:
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
48  vtkIdType FindClosestPoint(const double x[3]) override;
49 
55  vtkIdType FindClosestPointWithinRadius(double radius, const double x[3], double& dist2) override;
56 
65  void FindClosestNPoints(int N, const double x[3], vtkIdList* result) override;
66 
73  void FindPointsWithinRadius(double R, const double x[3], vtkIdList* result) override;
74 
76 
80  void FreeSearchStructure() override;
81  void BuildLocator() override;
82  void GenerateRepresentation(int level, vtkPolyData* pd) override;
84 
85 protected:
88 
90 
91 private:
93  void operator=(const vtkKdTreePointLocator&) = delete;
94 };
95 
96 #endif
vtkKdTreePointLocator::FindClosestPointWithinRadius
vtkIdType FindClosestPointWithinRadius(double radius, const double x[3], double &dist2) override
Given a position x and a radius r, return the id of the point closest to the point in that radius.
vtkAbstractPointLocator.h
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkKdTreePointLocator::vtkKdTreePointLocator
vtkKdTreePointLocator()
vtkKdTreePointLocator::BuildLocator
void BuildLocator() override
Build the locator from the input dataset.
vtkX3D::level
@ level
Definition: vtkX3D.h:401
vtkKdTreePointLocator::~vtkKdTreePointLocator
~vtkKdTreePointLocator() override
vtkKdTreePointLocator::FindClosestNPoints
void FindClosestNPoints(int N, const double x[3], vtkIdList *result) override
Find the closest N points to a position.
vtkKdTreePointLocator::FindPointsWithinRadius
void FindPointsWithinRadius(double R, const double x[3], vtkIdList *result) override
Find all points within a specified radius R of position x.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:31
vtkKdTreePointLocator::FindClosestPoint
vtkIdType FindClosestPoint(const double x[3]) override
Given a position x, return the id of the point closest to it.
vtkKdTreePointLocator::FreeSearchStructure
void FreeSearchStructure() override
See vtkLocator interface documentation.
vtkKdTreePointLocator::New
static vtkKdTreePointLocator * New()
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
vtkAbstractPointLocator
abstract class to quickly locate points in 3-space
Definition: vtkAbstractPointLocator.h:39
vtkKdTree
a Kd-tree spatial decomposition of a set of points
Definition: vtkKdTree.h:82
vtkKdTreePointLocator::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkKdTreePointLocator::KdTree
vtkKdTree * KdTree
Definition: vtkKdTreePointLocator.h:89
vtkX3D::radius
@ radius
Definition: vtkX3D.h:258
vtkKdTreePointLocator::GenerateRepresentation
void GenerateRepresentation(int level, vtkPolyData *pd) override
Method to build a representation at a particular level.
vtkKdTreePointLocator
class to quickly locate points in 3-space
Definition: vtkKdTreePointLocator.h:36