43 #ifndef __vtkCellLocator_h
44 #define __vtkCellLocator_h
46 #include "vtkAbstractCellLocator.h"
48 class vtkNeighborCells;
54 void PrintSelf(ostream& os,
vtkIndent indent);
63 { this->SetNumberOfCellsPerNode(N); }
65 {
return this->NumberOfCellsPerNode; }
81 double a0[3],
double a1[3],
double tol,
82 double& t,
double x[3],
double pcoords[3],
86 IntersectWithLine(a0, a1, tol,t, x, pcoords, subId);
93 double a0[3],
double a1[3],
double tol,
94 double& t,
double x[3],
double pcoords[3],
98 IntersectWithLine(a0, a1, tol,t, x, pcoords, subId, cellId);
105 const double a0[3],
const double a1[3],
109 IntersectWithLine(a0, a1, points, cellIds);
118 virtual int IntersectWithLine(
double a0[3],
double a1[3],
double tol,
119 double& t,
double x[3],
double pcoords[3],
127 double x[3],
double closestPoint[3],
128 vtkIdType &cellId,
int &subId,
double& dist2)
131 FindClosestPoint(x, closestPoint, cellId, subId, dist2);
145 virtual void FindClosestPoint(
146 double x[3],
double closestPoint[3],
148 int &subId,
double& dist2);
154 double x[3],
double radius,
155 double closestPoint[3],
vtkIdType &cellId,
156 int &subId,
double& dist2)
158 return Superclass::FindClosestPointWithinRadius
159 (x, radius, closestPoint, cellId, subId, dist2);
166 double x[3],
double radius,
167 double closestPoint[3],
169 int &subId,
double& dist2)
171 return Superclass::FindClosestPointWithinRadius
172 (x, radius, closestPoint, cell, cellId, subId, dist2);
193 virtual vtkIdType FindClosestPointWithinRadius(
194 double x[3],
double radius,
double closestPoint[3],
196 int &subId,
double& dist2,
int &inside);
204 virtual int GetNumberOfBuckets(
void);
210 {
return this->Superclass::FindCell(x); }
219 double pcoords[3],
double *weights);
225 virtual void FindCellsWithinBounds(
double *bbox,
vtkIdList *cells);
233 virtual void FindCellsAlongLine(
234 double p1[3],
double p2[3],
double tolerance,
vtkIdList *cells);
239 virtual void FreeSearchStructure();
240 virtual void BuildLocator();
241 virtual void BuildLocatorIfNeeded();
242 virtual void ForceBuildLocator();
243 virtual void BuildLocatorInternal();
244 virtual void GenerateRepresentation(
int level,
vtkPolyData *pd);
251 void GetBucketNeighbors(
int ijk[3],
int ndivs,
int level);
252 void GetOverlappingBuckets(
double x[3],
int ijk[3],
double dist,
253 int prevMinLevel[3],
int prevMaxLevel[3]);
255 void ClearCellHasBeenVisited();
256 void ClearCellHasBeenVisited(
int id);
258 double Distance2ToBucket(
double x[3],
int nei[3]);
259 double Distance2ToBounds(
double x[3],
double bounds[6]);
268 void MarkParents(
void*,
int,
int,
int,
int,
int);
269 void GetChildren(
int idx,
int level,
int children[8]);
270 int GenerateIndex(
int offset,
int numDivs,
int i,
int j,
int k,
272 void GenerateFace(
int face,
int numDivs,
int i,
int j,
int k,
279 void ComputeOctantBounds(
int i,
int j,
int k);
280 double OctantBounds[6];
283 if ( this->OctantBounds[0] <= x[0] && x[0] <= this->OctantBounds[1] &&
284 this->OctantBounds[2] <= x[1] && x[1] <= this->OctantBounds[3] &&
285 this->OctantBounds[4] <= x[2] && x[2] <= this->OctantBounds[5] )
virtual vtkIdType FindClosestPointWithinRadius(double x[3], double radius, double closestPoint[3], vtkGenericCell *cell, vtkIdType &cellId, int &subId, double &dist2)
int IsInOctantBounds(double x[3])
vtkNeighborCells * Buckets
virtual vtkIdType FindClosestPointWithinRadius(double x[3], double radius, double closestPoint[3], vtkIdType &cellId, int &subId, double &dist2)
virtual int IntersectWithLine(double a0[3], double a1[3], double tol, double &t, double x[3], double pcoords[3], int &subId)
int GetNumberOfCellsPerBucket()
void SetNumberOfCellsPerBucket(int N)
concrete dataset represents vertices, lines, polygons, and triangle strips
provides thread-safe access to cells
unsigned char * CellHasBeenVisited
octree-based spatial search object to quickly locate cells
virtual vtkIdType FindCell(double x[3])
a simple class to control print indentation
list of point or cell ids
unsigned char QueryNumber
object to represent cell connectivity
virtual int IntersectWithLine(const double a0[3], const double a1[3], vtkPoints *points, vtkIdList *cellIds)
virtual int IntersectWithLine(double a0[3], double a1[3], double tol, double &t, double x[3], double pcoords[3], int &subId, vtkIdType &cellId)
represent and manipulate 3D points
virtual void FindClosestPoint(double x[3], double closestPoint[3], vtkIdType &cellId, int &subId, double &dist2)