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],
97 int IntersectWithLine(
const double p1[3],
const double p2[3],
double tol,
double& t,
double x[3],
98 double pcoords[3],
int &subId)
override 100 return this->Superclass::IntersectWithLine(p1, p2, tol, t, x, pcoords, subId);
109 int IntersectWithLine(
const double p1[3],
const double p2[3],
double tol,
double &t,
double x[3],
110 double pcoords[3],
int &subId,
vtkIdType &cellId)
override;
116 const double p1[3],
const double p2[3],
119 return this->Superclass::IntersectWithLine(p1, p2,
points, cellIds);
126 {
return this->Superclass::FindCell(x); }
134 virtual void BuildLocatorInternal();
135 virtual void BuildLocatorIfNeeded();
136 virtual void ForceBuildLocator();
150 friend class vtkCellPointTraversal;
152 friend class vtkCellTreeBuilder;
182 friend class vtkCellPointTraversal;
183 friend class vtkCellTreeBuilder;
186 void MakeNode(
unsigned int left,
unsigned int d,
float b[2] );
187 void SetChildren(
unsigned int left );
189 unsigned int GetLeftChildIndex()
const;
190 unsigned int GetRightChildIndex()
const;
191 unsigned int GetDimension()
const;
192 const float& GetLeftMaxValue()
const;
193 const float& GetRightMinValue()
const;
194 void MakeLeaf(
unsigned int start,
unsigned int size );
196 unsigned int Start()
const;
197 unsigned int Size()
const;
205 bool RayMinMaxT(
const double origin[3],
210 bool RayMinMaxT(
const double bounds[6],
211 const double origin[3],
216 int getDominantAxis(
const double dir[3]);
219 void Classify(
const double origin[3],
230 virtual int IntersectCellInternal(
vtkIdType cell_ID,
const double p1[3],
243 friend class vtkCellPointTraversal;
245 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.
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
virtual int IntersectWithLine(const double p1[3], const 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.
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.
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...
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
virtual void GenerateRepresentation(int level, vtkPolyData *pd)=0
Method to build a representation at a particular level.
represent and manipulate 3D points