VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Common/DataModel/vtkAbstractCellLocator.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkAbstractCellLocator.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 =========================================================================*/
00038 #ifndef vtkAbstractCellLocator_h
00039 #define vtkAbstractCellLocator_h
00040 
00041 #include "vtkCommonDataModelModule.h" // For export macro
00042 #include "vtkLocator.h"
00043 
00044 class vtkCellArray;
00045 class vtkGenericCell;
00046 class vtkIdList;
00047 class vtkPoints;
00048 
00049 class VTKCOMMONDATAMODEL_EXPORT vtkAbstractCellLocator : public vtkLocator
00050 {
00051 public:
00052   vtkTypeMacro(vtkAbstractCellLocator,vtkLocator);
00053   void PrintSelf(ostream& os, vtkIndent indent);
00054 
00056 
00060   vtkSetClampMacro(NumberOfCellsPerNode,int,1,VTK_INT_MAX);
00061   vtkGetMacro(NumberOfCellsPerNode,int);
00063 
00065 
00070   vtkSetMacro(CacheCellBounds,int);
00071   vtkGetMacro(CacheCellBounds,int);
00072   vtkBooleanMacro(CacheCellBounds,int);
00074 
00076 
00080   vtkSetMacro(RetainCellLists,int);
00081   vtkGetMacro(RetainCellLists,int);
00082   vtkBooleanMacro(RetainCellLists,int);
00084 
00086 
00090   vtkSetMacro(LazyEvaluation,int);
00091   vtkGetMacro(LazyEvaluation,int);
00092   vtkBooleanMacro(LazyEvaluation,int);
00094 
00096 
00100   vtkSetMacro(UseExistingSearchStructure,int);
00101   vtkGetMacro(UseExistingSearchStructure,int);
00102   vtkBooleanMacro(UseExistingSearchStructure,int);
00104 
00106 
00108   virtual int IntersectWithLine(
00109     double p1[3], double p2[3], double tol, double& t, double x[3],
00110     double pcoords[3], int &subId);
00112 
00114 
00116   virtual int IntersectWithLine(
00117     double p1[3], double p2[3], double tol, double& t, double x[3],
00118     double pcoords[3], int &subId, vtkIdType &cellId);
00120 
00122 
00125   virtual int IntersectWithLine(
00126     double p1[3], double p2[3], double tol, double& t, double x[3],
00127     double pcoords[3], int &subId, vtkIdType &cellId, vtkGenericCell *cell);
00129 
00131 
00140   virtual int IntersectWithLine(
00141     const double p1[3], const double p2[3],
00142     vtkPoints *points, vtkIdList *cellIds);
00144 
00146 
00149   virtual void FindClosestPoint(
00150     double x[3], double closestPoint[3],
00151     vtkIdType &cellId, int &subId, double& dist2);
00153 
00155 
00164   virtual void FindClosestPoint(
00165     double x[3], double closestPoint[3],
00166     vtkGenericCell *cell, vtkIdType &cellId,
00167     int &subId, double& dist2);
00169 
00171 
00177   virtual vtkIdType FindClosestPointWithinRadius(
00178     double x[3], double radius,
00179     double closestPoint[3], vtkIdType &cellId,
00180     int &subId, double& dist2);
00182 
00184 
00197   virtual vtkIdType FindClosestPointWithinRadius(
00198     double x[3], double radius,
00199     double closestPoint[3],
00200     vtkGenericCell *cell, vtkIdType &cellId,
00201     int &subId, double& dist2);
00203 
00205 
00220   virtual vtkIdType FindClosestPointWithinRadius(
00221     double x[3], double radius,
00222     double closestPoint[3],
00223     vtkGenericCell *cell, vtkIdType &cellId,
00224     int &subId, double& dist2, int &inside);
00226 
00230   virtual void FindCellsWithinBounds(double *bbox, vtkIdList *cells);
00231 
00233 
00238   virtual void FindCellsAlongLine(
00239     double p1[3], double p2[3], double tolerance, vtkIdList *cells);
00241 
00244   virtual vtkIdType FindCell(double x[3]);
00245 
00247 
00250   virtual vtkIdType FindCell(
00251     double x[3], double tol2, vtkGenericCell *GenCell,
00252     double pcoords[3], double *weights);
00254 
00258   virtual bool InsideCellBounds(double x[3], vtkIdType cell_ID);
00259 
00260 protected:
00261    vtkAbstractCellLocator();
00262   ~vtkAbstractCellLocator();
00263 
00265 
00270   virtual bool StoreCellBounds();
00271   virtual void FreeCellBounds();
00273 
00274   int NumberOfCellsPerNode;
00275   int RetainCellLists;
00276   int CacheCellBounds;
00277   int LazyEvaluation;
00278   int UseExistingSearchStructure;
00279   vtkGenericCell *GenericCell;
00280 //BTX - begin tcl exclude
00281   double (*CellBounds)[6];
00282 //ETX - end tcl exclude
00283 
00284 private:
00285   vtkAbstractCellLocator(const vtkAbstractCellLocator&);  // Not implemented.
00286   void operator=(const vtkAbstractCellLocator&);  // Not implemented.
00287 };
00288 
00289 #endif
00290 
00291