39 #ifndef __vtkCellTreeLocator_h
40 #define __vtkCellTreeLocator_h
42 #include "vtkFiltersGeneralModule.h"
43 #include "vtkAbstractCellLocator.h"
46 class vtkCellPointTraversal;
57 void PrintSelf(ostream& os, vtkIndent indent);
67 virtual vtkIdType FindCell(
double pos[3],
double vtkNotUsed,
vtkGenericCell *cell,
double pcoords[3],
75 virtual int IntersectWithLine(
double a0[3],
double a1[3],
double tol,
76 double& t,
double x[3],
double pcoords[3],
77 int &subId, vtkIdType &cellId,
84 virtual void FindCellsWithinBounds(
double *bbox, vtkIdList *cells);
98 double p1[3],
double p2[3],
double tol,
double& t,
double x[3],
99 double pcoords[3],
int &subId)
101 return this->Superclass::IntersectWithLine(p1, p2, tol, t, x, pcoords, subId);
111 virtual int IntersectWithLine(
112 double p1[3],
double p2[3],
double tol,
double &t,
double x[3],
113 double pcoords[3],
int &subId, vtkIdType &cellId);
119 const double p1[3],
const double p2[3],
120 vtkPoints *points, vtkIdList *cellIds)
122 return this->Superclass::IntersectWithLine(p1, p2, points, cellIds);
129 {
return this->Superclass::FindCell(x); }
134 virtual void FreeSearchStructure();
135 virtual void GenerateRepresentation(
int level,
vtkPolyData *pd);
136 virtual void BuildLocatorInternal();
137 virtual void BuildLocatorIfNeeded();
138 virtual void ForceBuildLocator();
139 virtual void BuildLocator();
152 friend class vtkCellPointTraversal;
154 friend class vtkCellTreeBuilder;
184 friend class vtkCellPointTraversal;
185 friend class vtkCellTreeBuilder;
188 void MakeNode(
unsigned int left,
unsigned int d,
float b[2] );
189 void SetChildren(
unsigned int left );
191 unsigned int GetLeftChildIndex()
const;
192 unsigned int GetRightChildIndex()
const;
193 unsigned int GetDimension()
const;
194 const float& GetLeftMaxValue()
const;
195 const float& GetRightMinValue()
const;
196 void MakeLeaf(
unsigned int start,
unsigned int size );
198 unsigned int Start()
const;
199 unsigned int Size()
const;
208 bool RayMinMaxT(
const double origin[3],
213 bool RayMinMaxT(
const double bounds[6],
214 const double origin[3],
219 int getDominantAxis(
const double dir[3]);
222 void Classify(
const double origin[3],
233 virtual int IntersectCellInternal( vtkIdType cell_ID,
const double p1[3],
246 friend class vtkCellPointTraversal;
248 friend class vtkCellTreeBuilder;
std::vector< vtkCellTreeNode > Nodes
concrete dataset represents vertices, lines, polygons, and triangle strips
provides thread-safe access to cells
virtual int IntersectWithLine(const double p1[3], const double p2[3], vtkPoints *points, vtkIdList *cellIds)
std::vector< unsigned int > Leaves
object to represent cell connectivity
virtual int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)
This class implements the data structures, construction algorithms for fast cell location presented i...
virtual vtkIdType FindCell(double x[3])