VTK  9.2.6
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=========================================================================*/
25
26#ifndef vtkKdTreePointLocator_h
27#define vtkKdTreePointLocator_h
28
30#include "vtkCommonDataModelModule.h" // For export macro
31
32class vtkIdList;
33class vtkKdTree;
34
35class VTKCOMMONDATAMODEL_EXPORT vtkKdTreePointLocator : public vtkAbstractPointLocator
36{
37public:
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 ForceBuildLocator() override;
83 void GenerateRepresentation(int level, vtkPolyData* pd) override;
85
86protected:
89
90 void BuildLocatorInternal() override;
91
93
94private:
96 void operator=(const vtkKdTreePointLocator&) = delete;
97};
98
99#endif
list of point or cell ids
Definition vtkIdList.h:31
a simple class to control print indentation
Definition vtkIndent.h:34
void FindClosestNPoints(int N, const double x[3], vtkIdList *result) override
Find the closest N points to a position.
void BuildLocatorInternal() override
This function is not pure virtual to maintain backwards compatibility.
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.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard type and print methods.
void GenerateRepresentation(int level, vtkPolyData *pd) override
See vtkLocator interface documentation.
~vtkKdTreePointLocator() override
void ForceBuildLocator() override
See vtkLocator interface documentation.
void FindPointsWithinRadius(double R, const double x[3], vtkIdList *result) override
Find all points within a specified radius R of position x.
void BuildLocator() override
See vtkLocator interface documentation.
vtkIdType FindClosestPoint(const double x[3]) override
Given a position x, return the id of the point closest to it.
void FreeSearchStructure() override
See vtkLocator interface documentation.
static vtkKdTreePointLocator * New()
a Kd-tree spatial decomposition of a set of points
Definition vtkKdTree.h:79
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:85
int vtkIdType
Definition vtkType.h:332