43 #ifndef vtkCellLocator_h
44 #define vtkCellLocator_h
49 class vtkNeighborCells;
81 double& t,
double x[3],
double pcoords[3],
97 double x[3],
double closestPoint[3],
99 int &subId,
double& dist2);
120 double x[3],
double radius,
double closestPoint[3],
122 int &subId,
double& dist2,
int &inside);
130 virtual int GetNumberOfBuckets(
void);
138 double pcoords[3],
double *weights);
153 double p1[3],
double p2[3],
double tolerance,
vtkIdList *cells);
160 virtual void BuildLocatorIfNeeded();
161 virtual void ForceBuildLocator();
162 virtual void BuildLocatorInternal();
170 void GetBucketNeighbors(
int ijk[3],
int ndivs,
int level);
171 void GetOverlappingBuckets(
double x[3],
int ijk[3],
double dist,
172 int prevMinLevel[3],
int prevMaxLevel[3]);
174 void ClearCellHasBeenVisited();
175 void ClearCellHasBeenVisited(
int id);
177 double Distance2ToBucket(
double x[3],
int nei[3]);
178 double Distance2ToBounds(
double x[3],
double bounds[6]);
187 void MarkParents(
void*,
int,
int,
int,
int,
int);
188 void GetChildren(
int idx,
int level,
int children[8]);
189 int GenerateIndex(
int offset,
int numDivs,
int i,
int j,
int k,
191 void GenerateFace(
int face,
int numDivs,
int i,
int j,
int k,
198 void ComputeOctantBounds(
int i,
int j,
int k);
199 double OctantBounds[6];
202 if ( this->OctantBounds[0]-tol <= x[0] && x[0] <= this->OctantBounds[1]+tol &&
203 this->OctantBounds[2]-tol <= x[1] && x[1] <= this->OctantBounds[3]+tol &&
204 this->OctantBounds[4]-tol <= x[2] && x[2] <= this->OctantBounds[5]+tol )
virtual void BuildLocator()=0
virtual vtkIdType FindClosestPointWithinRadius(double x[3], double radius, double closestPoint[3], vtkIdType &cellId, int &subId, double &dist2)
virtual void FindClosestPoint(double x[3], double closestPoint[3], vtkIdType &cellId, int &subId, double &dist2)
virtual void FindCellsAlongLine(double p1[3], double p2[3], double tolerance, vtkIdList *cells)
virtual void FindCellsWithinBounds(double *bbox, vtkIdList *cells)
vtkNeighborCells * Buckets
virtual void SetNumberOfCellsPerNode(int)
an abstract base class for locators which find cells
int GetNumberOfCellsPerBucket()
void SetNumberOfCellsPerBucket(int N)
concrete dataset represents vertices, lines, polygons, and triangle strips
virtual void FreeSearchStructure()=0
provides thread-safe access to cells
void PrintSelf(ostream &os, vtkIndent indent)
unsigned char * CellHasBeenVisited
octree-based spatial search object to quickly locate cells
int IsInOctantBounds(double x[3], double tol=0.0)
a simple class to control print indentation
virtual vtkIdType FindCell(double x[3])
list of point or cell ids
unsigned char QueryNumber
virtual int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)
object to represent cell connectivity
virtual void GenerateRepresentation(int level, vtkPolyData *pd)=0
#define VTKCOMMONDATAMODEL_EXPORT
represent and manipulate 3D points