VTK
dox/Filtering/vtkKdTreePointLocator.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkKdTreePointLocator.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 =========================================================================*/
00028 #ifndef __vtkKdTreePointLocator_h
00029 #define __vtkKdTreePointLocator_h
00030 
00031 #include "vtkAbstractPointLocator.h"
00032 
00033 class vtkIdList;
00034 class vtkKdTree;
00035 
00036 class VTK_FILTERING_EXPORT vtkKdTreePointLocator : public vtkAbstractPointLocator
00037 {
00038 public:
00039   vtkTypeMacro(vtkKdTreePointLocator,vtkAbstractPointLocator);
00040   static vtkKdTreePointLocator* New();
00041   void PrintSelf(ostream& os, vtkIndent indent);
00042 
00047   virtual vtkIdType FindClosestPoint(const double x[3]);
00048 
00050 
00053   virtual vtkIdType FindClosestPointWithinRadius(
00054     double radius, const double x[3], double& dist2);
00056 
00058 
00064   virtual void FindClosestNPoints(
00065     int N, const double x[3], vtkIdList *result);
00067 
00069 
00073   virtual void FindPointsWithinRadius(double R, const double x[3],
00074                                       vtkIdList *result);
00076   
00078 
00080   virtual void FreeSearchStructure();
00081   virtual void BuildLocator();
00082   virtual void GenerateRepresentation(int level, vtkPolyData *pd);
00084 
00085 protected:
00086   vtkKdTreePointLocator();
00087   virtual ~vtkKdTreePointLocator();
00088 
00089   vtkKdTree* KdTree;
00090 
00091 private:
00092   vtkKdTreePointLocator(const vtkKdTreePointLocator&);  // Not implemented.
00093   void operator=(const vtkKdTreePointLocator&);  // Not implemented.
00094 };
00095 
00096 #endif
00097 
00098