VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Common/DataModel/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 "vtkCommonDataModelModule.h" // For export macro
00032 #include "vtkAbstractPointLocator.h"
00033 
00034 class vtkIdList;
00035 class vtkKdTree;
00036 
00037 class VTKCOMMONDATAMODEL_EXPORT vtkKdTreePointLocator : public vtkAbstractPointLocator
00038 {
00039 public:
00040   vtkTypeMacro(vtkKdTreePointLocator,vtkAbstractPointLocator);
00041   static vtkKdTreePointLocator* New();
00042   void PrintSelf(ostream& os, vtkIndent indent);
00043 
00048   virtual vtkIdType FindClosestPoint(const double x[3]);
00049 
00051 
00054   virtual vtkIdType FindClosestPointWithinRadius(
00055     double radius, const double x[3], double& dist2);
00057 
00059 
00065   virtual void FindClosestNPoints(
00066     int N, const double x[3], vtkIdList *result);
00068 
00070 
00074   virtual void FindPointsWithinRadius(double R, const double x[3],
00075                                       vtkIdList *result);
00077 
00079 
00081   virtual void FreeSearchStructure();
00082   virtual void BuildLocator();
00083   virtual void GenerateRepresentation(int level, vtkPolyData *pd);
00085 
00086 protected:
00087   vtkKdTreePointLocator();
00088   virtual ~vtkKdTreePointLocator();
00089 
00090   vtkKdTree* KdTree;
00091 
00092 private:
00093   vtkKdTreePointLocator(const vtkKdTreePointLocator&);  // Not implemented.
00094   void operator=(const vtkKdTreePointLocator&);  // Not implemented.
00095 };
00096 
00097 #endif
00098 
00099