VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkAbstractCellLocator.h,v $ 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 "vtkLocator.h" 00042 00043 class vtkCellArray; 00044 class vtkGenericCell; 00045 class vtkIdList; 00046 class vtkPoints; 00047 00048 class VTK_FILTERING_EXPORT vtkAbstractCellLocator : public vtkLocator 00049 { 00050 public: 00051 vtkTypeRevisionMacro(vtkAbstractCellLocator,vtkLocator); 00052 void PrintSelf(ostream& os, vtkIndent indent); 00053 00055 00059 vtkSetClampMacro(NumberOfCellsPerNode,int,1,VTK_LARGE_INTEGER); 00060 vtkGetMacro(NumberOfCellsPerNode,int); 00062 00064 00069 vtkSetMacro(CacheCellBounds,int); 00070 vtkGetMacro(CacheCellBounds,int); 00071 vtkBooleanMacro(CacheCellBounds,int); 00073 00075 00079 vtkSetMacro(RetainCellLists,int); 00080 vtkGetMacro(RetainCellLists,int); 00081 vtkBooleanMacro(RetainCellLists,int); 00083 00085 00089 vtkSetMacro(LazyEvaluation,int); 00090 vtkGetMacro(LazyEvaluation,int); 00091 vtkBooleanMacro(LazyEvaluation,int); 00093 00095 00099 vtkSetMacro(UseExistingSearchStructure,int); 00100 vtkGetMacro(UseExistingSearchStructure,int); 00101 vtkBooleanMacro(UseExistingSearchStructure,int); 00103 00105 00107 virtual int IntersectWithLine( 00108 double a0[3], double a1[3], double tol, 00109 double& t, double x[3], double pcoords[3], 00110 int &subId); 00112 00114 00116 virtual int IntersectWithLine( 00117 double a0[3], double a1[3], double tol, 00118 double& t, double x[3], double pcoords[3], 00119 int &subId, vtkIdType &cellId); 00121 00123 00126 virtual int IntersectWithLine( 00127 double a0[3], double a1[3], double tol, 00128 double& t, double x[3], double pcoords[3], 00129 int &subId, vtkIdType &cellId, 00130 vtkGenericCell *cell); 00132 00134 00143 virtual int IntersectWithLine( 00144 const double a0[3], const double a1[3], 00145 vtkPoints *points, vtkIdList *cellIds); 00147 00149 00152 virtual void FindClosestPoint( 00153 double x[3], double closestPoint[3], 00154 vtkIdType &cellId, int &subId, double& dist2); 00156 00158 00167 virtual void FindClosestPoint( 00168 double x[3], double closestPoint[3], 00169 vtkGenericCell *cell, vtkIdType &cellId, 00170 int &subId, double& dist2); 00172 00174 00180 virtual vtkIdType FindClosestPointWithinRadius( 00181 double x[3], double radius, 00182 double closestPoint[3], vtkIdType &cellId, 00183 int &subId, double& dist2); 00185 00187 00200 virtual vtkIdType FindClosestPointWithinRadius( 00201 double x[3], double radius, 00202 double closestPoint[3], 00203 vtkGenericCell *cell, vtkIdType &cellId, 00204 int &subId, double& dist2); 00206 00208 00223 virtual vtkIdType FindClosestPointWithinRadius( 00224 double x[3], double radius, 00225 double closestPoint[3], 00226 vtkGenericCell *cell, vtkIdType &cellId, 00227 int &subId, double& dist2, int &inside); 00229 00233 virtual void FindCellsWithinBounds(double *bbox, vtkIdList *cells); 00234 00236 00241 virtual void FindCellsAlongLine( 00242 double p1[3], double p2[3], double tolerance, vtkIdList *cells); 00244 00247 virtual vtkIdType FindCell(double x[3]); 00248 00250 00253 virtual vtkIdType FindCell( 00254 double x[3], double tol2, vtkGenericCell *GenCell, 00255 double pcoords[3], double *weights); 00257 00261 virtual bool InsideCellBounds(double x[3], vtkIdType cell_ID); 00262 00263 protected: 00264 vtkAbstractCellLocator(); 00265 ~vtkAbstractCellLocator(); 00266 00268 00273 virtual bool StoreCellBounds(); 00274 virtual void FreeCellBounds(); 00276 00277 int NumberOfCellsPerNode; 00278 int RetainCellLists; 00279 int CacheCellBounds; 00280 int LazyEvaluation; 00281 int UseExistingSearchStructure; 00282 vtkGenericCell *GenericCell; 00283 //BTX - begin tcl exclude 00284 double (*CellBounds)[6]; 00285 //ETX - end tcl exclude 00286 00287 private: 00288 vtkAbstractCellLocator(const vtkAbstractCellLocator&); // Not implemented. 00289 void operator=(const vtkAbstractCellLocator&); // Not implemented. 00290 }; 00291 00292 #endif 00293 00294