VTK
dox/Common/DataModel/vtkAbstractPointLocator.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkAbstractPointLocator.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00029 #ifndef __vtkAbstractPointLocator_h
00030 #define __vtkAbstractPointLocator_h
00031 
00032 #include "vtkCommonDataModelModule.h" // For export macro
00033 #include "vtkLocator.h"
00034 
00035 class vtkIdList;
00036 
00037 class VTKCOMMONDATAMODEL_EXPORT vtkAbstractPointLocator : public vtkLocator
00038 {
00039 public:
00040   vtkTypeMacro(vtkAbstractPointLocator,vtkLocator);
00041   void PrintSelf(ostream& os, vtkIndent indent);
00042 
00044 
00048   virtual vtkIdType FindClosestPoint(const double x[3]) = 0;
00049   vtkIdType FindClosestPoint(double x, double y, double z);
00051 
00053 
00056   virtual vtkIdType FindClosestPointWithinRadius(
00057     double radius, const double x[3], double& dist2) = 0;
00059 
00061 
00067   virtual void FindClosestNPoints(
00068     int N, const double x[3], vtkIdList *result) = 0;
00069   void FindClosestNPoints(int N, double x, double y, double z,
00070                           vtkIdList *result);
00072 
00074 
00078   virtual void FindPointsWithinRadius(double R, const double x[3],
00079                                       vtkIdList *result) = 0;
00080   void FindPointsWithinRadius(double R, double x, double y, double z,
00081                                       vtkIdList *result);
00083 
00085 
00086   virtual double *GetBounds() { return this->Bounds; }
00087   virtual void GetBounds(double*);
00089 
00091 
00093   virtual void FreeSearchStructure() = 0;
00094   virtual void BuildLocator() = 0;
00095   virtual void GenerateRepresentation(int level, vtkPolyData *pd) = 0;
00097 
00098 protected:
00099   vtkAbstractPointLocator();
00100   virtual ~vtkAbstractPointLocator();
00101 
00102   double Bounds[6]; // bounds of points
00103 
00104 private:
00105   vtkAbstractPointLocator(const vtkAbstractPointLocator&);  // Not implemented.
00106   void operator=(const vtkAbstractPointLocator&);  // Not implemented.
00107 };
00108 
00109 #endif
00110 
00111