VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 =========================================================================*/
28 #ifndef __vtkKdTreePointLocator_h
29 #define __vtkKdTreePointLocator_h
30 
31 #include "vtkCommonDataModelModule.h" // For export macro
32 #include "vtkAbstractPointLocator.h"
33 
34 class vtkIdList;
35 class vtkKdTree;
36 
37 class VTKCOMMONDATAMODEL_EXPORT vtkKdTreePointLocator : public vtkAbstractPointLocator
38 {
39 public:
40  vtkTypeMacro(vtkKdTreePointLocator,vtkAbstractPointLocator);
41  static vtkKdTreePointLocator* New();
42  void PrintSelf(ostream& os, vtkIndent indent);
43 
48  virtual vtkIdType FindClosestPoint(const double x[3]);
49 
51 
54  virtual vtkIdType FindClosestPointWithinRadius(
55  double radius, const double x[3], double& dist2);
57 
59 
65  virtual void FindClosestNPoints(
66  int N, const double x[3], vtkIdList *result);
68 
70 
74  virtual void FindPointsWithinRadius(double R, const double x[3],
75  vtkIdList *result);
77 
79 
81  virtual void FreeSearchStructure();
82  virtual void BuildLocator();
83  virtual void GenerateRepresentation(int level, vtkPolyData *pd);
85 
86 protected:
88  virtual ~vtkKdTreePointLocator();
89 
90  vtkKdTree* KdTree;
91 
92 private:
93  vtkKdTreePointLocator(const vtkKdTreePointLocator&); // Not implemented.
94  void operator=(const vtkKdTreePointLocator&); // Not implemented.
95 };
96 
97 #endif
98 
99 
class to quickly locate points in 3-space
int vtkIdType
Definition: vtkType.h:268
a simple class to control print indentation
Definition: vtkIndent.h:38
list of point or cell ids
Definition: vtkIdList.h:35