VTK
dox/Filtering/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 "vtkLocator.h"
00033 
00034 class vtkIdList;
00035 
00036 class VTK_FILTERING_EXPORT vtkAbstractPointLocator : public vtkLocator
00037 {
00038 public:
00039   vtkTypeMacro(vtkAbstractPointLocator,vtkLocator);
00040   void PrintSelf(ostream& os, vtkIndent indent);
00041 
00043 
00047   virtual vtkIdType FindClosestPoint(const double x[3]) = 0;
00048   vtkIdType FindClosestPoint(double x, double y, double z);
00050 
00052 
00055   virtual vtkIdType FindClosestPointWithinRadius(
00056     double radius, const double x[3], double& dist2) = 0;
00058 
00060 
00066   virtual void FindClosestNPoints(
00067     int N, const double x[3], vtkIdList *result) = 0;
00068   void FindClosestNPoints(int N, double x, double y, double z,
00069                           vtkIdList *result);
00071 
00073 
00077   virtual void FindPointsWithinRadius(double R, const double x[3],
00078                                       vtkIdList *result) = 0;
00079   void FindPointsWithinRadius(double R, double x, double y, double z, 
00080                                       vtkIdList *result);
00082   
00084 
00085   virtual double *GetBounds() { return this->Bounds; }
00086   virtual void GetBounds(double*);
00088 
00090 
00092   virtual void FreeSearchStructure() = 0;
00093   virtual void BuildLocator() = 0;
00094   virtual void GenerateRepresentation(int level, vtkPolyData *pd) = 0;
00096 
00097 protected:
00098   vtkAbstractPointLocator();
00099   virtual ~vtkAbstractPointLocator();
00100 
00101   double Bounds[6]; // bounds of points
00102 
00103 private:
00104   vtkAbstractPointLocator(const vtkAbstractPointLocator&);  // Not implemented.
00105   void operator=(const vtkAbstractPointLocator&);  // Not implemented.
00106 };
00107 
00108 #endif
00109 
00110