43 #ifndef __vtkCellLocator_h
44 #define __vtkCellLocator_h
46 #include "vtkCommonDataModelModule.h"
49 class vtkNeighborCells;
63 void SetNumberOfCellsPerBucket(
int N)
65 int GetNumberOfCellsPerBucket()
82 double a0[3],
double a1[3],
double tol,
83 double& t,
double x[3],
double pcoords[3],
87 IntersectWithLine(a0, a1, tol,t, x, pcoords, subId);
94 double a0[3],
double a1[3],
double tol,
95 double& t,
double x[3],
double pcoords[3],
99 IntersectWithLine(a0, a1, tol,t, x, pcoords, subId, cellId);
106 const double a0[3],
const double a1[3],
110 IntersectWithLine(a0, a1, points, cellIds);
120 double& t,
double x[3],
double pcoords[3],
128 double x[3],
double closestPoint[3],
129 vtkIdType &cellId,
int &subId,
double& dist2)
132 FindClosestPoint(x, closestPoint, cellId, subId, dist2);
147 double x[3],
double closestPoint[3],
149 int &subId,
double& dist2);
155 double x[3],
double radius,
156 double closestPoint[3],
vtkIdType &cellId,
157 int &subId,
double& dist2)
159 return Superclass::FindClosestPointWithinRadius
160 (x, radius, closestPoint, cellId, subId, dist2);
167 double x[3],
double radius,
168 double closestPoint[3],
170 int &subId,
double& dist2)
172 return Superclass::FindClosestPointWithinRadius
173 (x, radius, closestPoint, cell, cellId, subId, dist2);
195 double x[3],
double radius,
double closestPoint[3],
197 int &subId,
double& dist2,
int &inside);
205 virtual int GetNumberOfBuckets(
void);
211 {
return this->Superclass::FindCell(x); }
220 double pcoords[3],
double *weights);
235 double p1[3],
double p2[3],
double tolerance,
vtkIdList *cells);
242 virtual void BuildLocatorIfNeeded();
243 virtual void ForceBuildLocator();
244 virtual void BuildLocatorInternal();
252 void GetBucketNeighbors(
int ijk[3],
int ndivs,
int level);
253 void GetOverlappingBuckets(
double x[3],
int ijk[3],
double dist,
254 int prevMinLevel[3],
int prevMaxLevel[3]);
256 void ClearCellHasBeenVisited();
257 void ClearCellHasBeenVisited(
int id);
259 double Distance2ToBucket(
double x[3],
int nei[3]);
260 double Distance2ToBounds(
double x[3],
double bounds[6]);
269 void MarkParents(
void*,
int,
int,
int,
int,
int);
270 void GetChildren(
int idx,
int level,
int children[8]);
271 int GenerateIndex(
int offset,
int numDivs,
int i,
int j,
int k,
273 void GenerateFace(
int face,
int numDivs,
int i,
int j,
int k,
280 void ComputeOctantBounds(
int i,
int j,
int k);
281 double OctantBounds[6];
282 int IsInOctantBounds(
double x[3])
284 if ( this->OctantBounds[0] <= x[0] && x[0] <= this->OctantBounds[1] &&
285 this->OctantBounds[2] <= x[1] && x[1] <= this->OctantBounds[3] &&
286 this->OctantBounds[4] <= x[2] && x[2] <= this->OctantBounds[5] )