37 #ifndef vtkCellTreeLocator_h 38 #define vtkCellTreeLocator_h 40 #include "vtkFiltersGeneralModule.h" 44 class vtkCellPointTraversal;
68 double* weights )
override;
75 double& t,
double x[3],
double pcoords[3],
98 double p1[3],
double p2[3],
double tol,
double& t,
double x[3],
99 double pcoords[3],
int &subId)
override 101 return this->Superclass::IntersectWithLine(p1, p2, tol, t, x, pcoords, subId);
111 double p1[3],
double p2[3],
double tol,
double &t,
double x[3],
112 double pcoords[3],
int &subId,
vtkIdType &cellId)
override;
118 const double p1[3],
const double p2[3],
121 return this->Superclass::IntersectWithLine(p1, p2,
points, cellIds);
128 {
return this->Superclass::FindCell(x); }
136 virtual void BuildLocatorInternal();
137 virtual void BuildLocatorIfNeeded();
138 virtual void ForceBuildLocator();
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;
207 bool RayMinMaxT(
const double origin[3],
212 bool RayMinMaxT(
const double bounds[6],
213 const double origin[3],
218 int getDominantAxis(
const double dir[3]);
221 void Classify(
const double origin[3],
232 virtual int IntersectCellInternal(
vtkIdType cell_ID,
const double p1[3],
245 friend class vtkCellPointTraversal;
247 friend class vtkCellTreeBuilder;
std::vector< vtkCellTreeNode > Nodes
virtual void BuildLocator()=0
Build the locator from the input dataset.
virtual void FindCellsWithinBounds(double *bbox, vtkIdList *cells)
Return a list of unique cell ids inside of a given bounding box.
int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId) override
reimplemented from vtkAbstractCellLocator to support bad compilers
Internal classes made public to allow subclasses to create customized some traversal algorithms...
an abstract base class for locators which find cells
dynamic, self-adjusting array of vtkIdType
concrete dataset represents vertices, lines, polygons, and triangle strips
virtual void FreeSearchStructure()=0
Free the memory required for the spatial data structure.
provides thread-safe access to cells
a simple class to control print indentation
virtual vtkIdType FindCell(double x[3])
Returns the Id of the cell containing the point, returns -1 if no cell found.
list of point or cell ids
std::vector< unsigned int > Leaves
vtkIdType FindCell(double x[3]) override
reimplemented from vtkAbstractCellLocator to support bad compilers
This class is the basic building block of the cell tree.
virtual int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)
Return intersection point (if any) of finite line with cells contained in cell locator.
object to represent cell connectivity
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int IntersectWithLine(const double p1[3], const double p2[3], vtkPoints *points, vtkIdList *cellIds) override
reimplemented from vtkAbstractCellLocator to support bad compilers
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
This class implements the data structures, construction algorithms for fast cell location presented i...
virtual void GenerateRepresentation(int level, vtkPolyData *pd)=0
Method to build a representation at a particular level.
represent and manipulate 3D points