VTK
vtkStaticPointLocator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkStaticPointLocator.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 =========================================================================*/
52 #ifndef vtkStaticPointLocator_h
53 #define vtkStaticPointLocator_h
54 
55 #include "vtkCommonDataModelModule.h" // For export macro
57 
58 class vtkIdList;
59 class vtkBucketList;
60 
61 
63 {
64 friend class vtkBucketList;
65 public:
68  static vtkStaticPointLocator *New();
69 
71 
73  void PrintSelf(ostream& os, vtkIndent indent);
75 
77 
80  vtkSetClampMacro(NumberOfPointsPerBucket,int,1,VTK_INT_MAX);
81  vtkGetMacro(NumberOfPointsPerBucket,int);
83 
85 
88  vtkSetVector3Macro(Divisions,int);
89  vtkGetVectorMacro(Divisions,int,3);
91 
92  // Re-use any superclass signatures that we don't override.
97 
102  virtual vtkIdType FindClosestPoint(const double x[3]);
103 
105 
113  double radius, const double x[3], double& dist2);
114  virtual vtkIdType FindClosestPointWithinRadius(double radius, const double x[3],
115  double inputDataLength,
116  double& dist2);
118 
125  virtual void FindClosestNPoints(int N, const double x[3], vtkIdList *result);
126 
128 
132  virtual void FindPointsWithinRadius(double R, const double x[3],
133  vtkIdList *result);
135 
137 
139  virtual void Initialize();
140  virtual void FreeSearchStructure();
141  virtual void BuildLocator();
142  virtual void GenerateRepresentation(int level, vtkPolyData *pd);
144 
145 protected:
147  virtual ~vtkStaticPointLocator();
148 
149  int NumberOfPointsPerBucket; // Used with AutomaticOn to control subdivide
150  int Divisions[3]; // Number of sub-divisions in x-y-z directions
151  double H[3]; // Width of each bucket in x-y-z directions
152  vtkBucketList *Buckets; // Lists of point ids in each bucket
153  int LargeIds; //indicate whether integer ids are small or large
154 
155 private:
156  vtkStaticPointLocator(const vtkStaticPointLocator&); // Not implemented.
157  void operator=(const vtkStaticPointLocator&); // Not implemented.
158 
159 };
160 
161 #endif
virtual void FreeSearchStructure()=0
virtual vtkIdType FindClosestPointWithinRadius(double radius, const double x[3], double &dist2)=0
#define VTK_INT_MAX
Definition: vtkType.h:130
int vtkIdType
Definition: vtkType.h:247
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
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
void PrintSelf(ostream &os, vtkIndent indent)
virtual void FindPointsWithinRadius(double R, const double x[3], vtkIdList *result)=0
quickly locate points in 3-space
virtual void FindClosestNPoints(int N, const double x[3], vtkIdList *result)=0
virtual vtkIdType FindClosestPoint(const double x[3])=0
virtual void BuildLocator()=0
virtual void Initialize()
static vtkObject * New()
virtual void GenerateRepresentation(int level, vtkPolyData *pd)=0
#define VTKCOMMONDATAMODEL_EXPORT