00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
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 vtkTypeMacro(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 p1[3], double p2[3], double tol, double& t, double x[3],
00109 double pcoords[3], int &subId);
00111
00113
00115 virtual int IntersectWithLine(
00116 double p1[3], double p2[3], double tol, double& t, double x[3],
00117 double pcoords[3], int &subId, vtkIdType &cellId);
00119
00121
00124 virtual int IntersectWithLine(
00125 double p1[3], double p2[3], double tol, double& t, double x[3],
00126 double pcoords[3], int &subId, vtkIdType &cellId, vtkGenericCell *cell);
00128
00130
00139 virtual int IntersectWithLine(
00140 const double p1[3], const double p2[3],
00141 vtkPoints *points, vtkIdList *cellIds);
00143
00145
00148 virtual void FindClosestPoint(
00149 double x[3], double closestPoint[3],
00150 vtkIdType &cellId, int &subId, double& dist2);
00152
00154
00163 virtual void FindClosestPoint(
00164 double x[3], double closestPoint[3],
00165 vtkGenericCell *cell, vtkIdType &cellId,
00166 int &subId, double& dist2);
00168
00170
00176 virtual vtkIdType FindClosestPointWithinRadius(
00177 double x[3], double radius,
00178 double closestPoint[3], vtkIdType &cellId,
00179 int &subId, double& dist2);
00181
00183
00196 virtual vtkIdType FindClosestPointWithinRadius(
00197 double x[3], double radius,
00198 double closestPoint[3],
00199 vtkGenericCell *cell, vtkIdType &cellId,
00200 int &subId, double& dist2);
00202
00204
00219 virtual vtkIdType FindClosestPointWithinRadius(
00220 double x[3], double radius,
00221 double closestPoint[3],
00222 vtkGenericCell *cell, vtkIdType &cellId,
00223 int &subId, double& dist2, int &inside);
00225
00229 virtual void FindCellsWithinBounds(double *bbox, vtkIdList *cells);
00230
00232
00237 virtual void FindCellsAlongLine(
00238 double p1[3], double p2[3], double tolerance, vtkIdList *cells);
00240
00243 virtual vtkIdType FindCell(double x[3]);
00244
00246
00249 virtual vtkIdType FindCell(
00250 double x[3], double tol2, vtkGenericCell *GenCell,
00251 double pcoords[3], double *weights);
00253
00257 virtual bool InsideCellBounds(double x[3], vtkIdType cell_ID);
00258
00259 protected:
00260 vtkAbstractCellLocator();
00261 ~vtkAbstractCellLocator();
00262
00264
00269 virtual bool StoreCellBounds();
00270 virtual void FreeCellBounds();
00272
00273 int NumberOfCellsPerNode;
00274 int RetainCellLists;
00275 int CacheCellBounds;
00276 int LazyEvaluation;
00277 int UseExistingSearchStructure;
00278 vtkGenericCell *GenericCell;
00279
00280 double (*CellBounds)[6];
00281
00282
00283 private:
00284 vtkAbstractCellLocator(const vtkAbstractCellLocator&);
00285 void operator=(const vtkAbstractCellLocator&);
00286 };
00287
00288 #endif
00289
00290