VTK
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=========================================================================*/
29#ifndef vtkKdTreePointLocator_h
30#define vtkKdTreePointLocator_h
31
32#include "vtkCommonDataModelModule.h" // For export macro
34
35class vtkIdList;
36class vtkKdTree;
37
38class VTKCOMMONDATAMODEL_EXPORT vtkKdTreePointLocator : public vtkAbstractPointLocator
39{
40public:
43 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
44
51 vtkIdType FindClosestPoint(const double x[3]) VTK_OVERRIDE;
52
59 double radius, const double x[3], double& dist2) VTK_OVERRIDE;
60
70 int N, const double x[3], vtkIdList *result) VTK_OVERRIDE;
71
78 void FindPointsWithinRadius(double R, const double x[3],
79 vtkIdList *result) VTK_OVERRIDE;
80
82
86 void FreeSearchStructure() VTK_OVERRIDE;
87 void BuildLocator() VTK_OVERRIDE;
88 void GenerateRepresentation(int level, vtkPolyData *pd) VTK_OVERRIDE;
90
91protected:
93 ~vtkKdTreePointLocator() VTK_OVERRIDE;
94
95 vtkKdTree* KdTree;
96
97private:
98 vtkKdTreePointLocator(const vtkKdTreePointLocator&) VTK_DELETE_FUNCTION;
99 void operator=(const vtkKdTreePointLocator&) VTK_DELETE_FUNCTION;
100};
101
102#endif
103
104
abstract class to quickly locate points in 3-space
list of point or cell ids
Definition: vtkIdList.h:37
a simple class to control print indentation
Definition: vtkIndent.h:40
class to quickly locate points in 3-space
void FindClosestNPoints(int N, const double x[3], vtkIdList *result) override
Find the closest N points to a position.
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
Methods invoked by print to print information about the object including superclasses.
void FindPointsWithinRadius(double R, const double x[3], vtkIdList *result) override
Find all points within a specified radius R of position x.
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:86
@ level
Definition: vtkX3D.h:395
@ radius
Definition: vtkX3D.h:252
int vtkIdType
Definition: vtkType.h:287