37 #ifndef vtkCellTreeLocator_h
38 #define vtkCellTreeLocator_h
41 #include "vtkFiltersGeneralModule.h"
44 class vtkCellPointTraversal;
69 double* weights)
override;
75 int IntersectWithLine(
const double a0[3],
const double a1[3],
double tol,
double& t,
double x[3],
96 int IntersectWithLine(
const double p1[3],
const double p2[3],
double tol,
double& t,
double x[3],
97 double pcoords[3],
int& subId)
override
99 return this->Superclass::IntersectWithLine(p1, p2, tol, t, x, pcoords, subId);
108 int IntersectWithLine(
const double p1[3],
const double p2[3],
double tol,
double& t,
double x[3],
109 double pcoords[3],
int& subId,
vtkIdType& cellId)
override;
117 return this->Superclass::IntersectWithLine(p1, p2,
points, cellIds);
147 friend class vtkCellPointTraversal;
149 friend class vtkCellTreeBuilder;
178 friend class vtkCellPointTraversal;
179 friend class vtkCellTreeBuilder;
182 void MakeNode(
unsigned int left,
unsigned int d,
float b[2]);
201 bool RayMinMaxT(
const double origin[3],
const double dir[3],
double& rTmin,
double& rTmax);
203 bool RayMinMaxT(
const double bounds[6],
const double origin[3],
const double dir[3],
204 double& rTmin,
double& rTmax);
218 const double tol,
double& t,
double ipt[3],
double pcoords[3],
int& subId);
224 friend class vtkCellPointTraversal;
226 friend class vtkCellTreeBuilder;
an abstract base class for locators which find cells
object to represent cell connectivity
This class is the basic building block of the cell tree.
void MakeLeaf(unsigned int start, unsigned int size)
unsigned int GetRightChildIndex() const
unsigned int Start() const
const float & GetLeftMaxValue() const
unsigned int GetDimension() const
const float & GetRightMinValue() const
void SetChildren(unsigned int left)
void MakeNode(unsigned int left, unsigned int d, float b[2])
unsigned int GetLeftChildIndex() const
unsigned int Size() const
Internal classes made public to allow subclasses to create customized some traversal algorithms.
std::vector< unsigned int > Leaves
std::vector< vtkCellTreeNode > Nodes
This class implements the data structures, construction algorithms for fast cell location presented i...
void FindCellsWithinBounds(double *bbox, vtkIdList *cells) override
Return a list of unique cell ids inside of a given bounding box.
int IntersectWithLine(const double p1[3], const double p2[3], vtkPoints *points, vtkIdList *cellIds) override
reimplemented from vtkAbstractCellLocator to support bad compilers
int IntersectWithLine(const double a0[3], const double a1[3], double tol, double &t, double x[3], double pcoords[3], int &subId, vtkIdType &cellId, vtkGenericCell *cell) override
Return intersection point (if any) AND the cell which was intersected by the finite line.
vtkIdType FindCell(double pos[3], double vtkNotUsed, vtkGenericCell *cell, double pcoords[3], double *weights) override
Test a point to find if it is inside a cell.
bool RayMinMaxT(const double bounds[6], const double origin[3], const double dir[3], double &rTmin, double &rTmax)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkCellTreeLocator * New()
Constructor sets the maximum number of cells in a leaf to 8 and number of buckets to 5.
int IntersectWithLine(const double p1[3], const double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId) override
reimplemented from vtkAbstractCellLocator to support bad compilers
int getDominantAxis(const double dir[3])
void Classify(const double origin[3], const double dir[3], double &rDist, vtkCellTreeNode *&near, vtkCellTreeNode *&mid, vtkCellTreeNode *&far, int &mustCheck)
virtual void BuildLocatorIfNeeded()
vtkIdType FindCell(double x[3]) override
reimplemented from vtkAbstractCellLocator to support bad compilers
virtual void ForceBuildLocator()
~vtkCellTreeLocator() override
virtual int IntersectCellInternal(vtkIdType cell_ID, const double p1[3], const double p2[3], const double tol, double &t, double ipt[3], double pcoords[3], int &subId)
bool RayMinMaxT(const double origin[3], const double dir[3], double &rTmin, double &rTmax)
virtual void BuildLocatorInternal()
void FreeSearchStructure() override
Satisfy vtkLocator abstract interface.
int IntersectWithLine(const double p1[3], const double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId, vtkIdType &cellId) override
Return intersection point (if any) AND the cell which was intersected by the finite line.
void GenerateRepresentation(int level, vtkPolyData *pd) override
Method to build a representation at a particular level.
void BuildLocator() override
Build the locator from the input dataset.
provides thread-safe access to cells
list of point or cell ids
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
represent and manipulate 3D points
concrete dataset represents vertices, lines, polygons, and triangle strips