VTK
vtkAbstractPointLocator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAbstractPointLocator.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 =========================================================================*/
32 #ifndef vtkAbstractPointLocator_h
33 #define vtkAbstractPointLocator_h
34 
35 #include "vtkCommonDataModelModule.h" // For export macro
36 #include "vtkLocator.h"
37 
38 class vtkIdList;
39 
41 {
42 public:
44 
46  void PrintSelf(ostream& os, vtkIndent indent);
48 
50 
54  virtual vtkIdType FindClosestPoint(const double x[3]) = 0;
55  vtkIdType FindClosestPoint(double x, double y, double z);
57 
59 
62  virtual vtkIdType FindClosestPointWithinRadius(
63  double radius, const double x[3], double& dist2) = 0;
65 
67 
73  virtual void FindClosestNPoints(
74  int N, const double x[3], vtkIdList *result) = 0;
75  void FindClosestNPoints(int N, double x, double y, double z,
76  vtkIdList *result);
78 
80 
84  virtual void FindPointsWithinRadius(double R, const double x[3],
85  vtkIdList *result) = 0;
86  void FindPointsWithinRadius(double R, double x, double y, double z,
87  vtkIdList *result);
89 
91 
92  virtual double *GetBounds() { return this->Bounds; }
93  virtual void GetBounds(double*);
95 
97 
99  vtkGetMacro(NumberOfBuckets,vtkIdType);
101 
103 
105  virtual void FreeSearchStructure() = 0;
106  virtual void BuildLocator() = 0;
107  virtual void GenerateRepresentation(int level, vtkPolyData *pd) = 0;
109 
110 protected:
112  virtual ~vtkAbstractPointLocator();
113 
114  double Bounds[6]; // bounds of points
115  vtkIdType NumberOfBuckets; // total size of locator
116 
117 private:
118  vtkAbstractPointLocator(const vtkAbstractPointLocator&); // Not implemented.
119  void operator=(const vtkAbstractPointLocator&); // Not implemented.
120 };
121 
122 #endif
virtual void BuildLocator()=0
abstract base class for objects that accelerate spatial searches
Definition: vtkLocator.h:68
void PrintSelf(ostream &os, vtkIndent indent)
int vtkIdType
Definition: vtkType.h:247
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
virtual void FreeSearchStructure()=0
a simple class to control print indentation
Definition: vtkIndent.h:38
abstract class to quickly locate points in 3-space
list of point or cell ids
Definition: vtkIdList.h:35
virtual void GenerateRepresentation(int level, vtkPolyData *pd)=0
#define VTKCOMMONDATAMODEL_EXPORT