43 #ifndef __vtkCellLocator_h
44 #define __vtkCellLocator_h
49 class vtkNeighborCells;
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);
156 double closestPoint[3],
vtkIdType &cellId,
157 int &subId,
double& dist2)
159 return Superclass::FindClosestPointWithinRadius
160 (x, radius, closestPoint, cellId, subId, dist2);
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];
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] )
virtual vtkIdType FindClosestPointWithinRadius(double x[3], double radius, double closestPoint[3], vtkGenericCell *cell, vtkIdType &cellId, int &subId, double &dist2)
int IsInOctantBounds(double x[3])
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 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)
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)
GLint GLint GLint GLint GLint x
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
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
GLsizei const GLfloat * points
virtual int IntersectWithLine(const double a0[3], const double a1[3], vtkPoints *points, vtkIdList *cellIds)
GLenum GLuint GLint GLenum face
virtual int IntersectWithLine(double a0[3], double a1[3], double tol, double &t, double x[3], double pcoords[3], int &subId, vtkIdType &cellId)
virtual void GenerateRepresentation(int level, vtkPolyData *pd)=0
#define VTKCOMMONDATAMODEL_EXPORT
represent and manipulate 3D points
virtual void FindClosestPoint(double x[3], double closestPoint[3], vtkIdType &cellId, int &subId, double &dist2)