146 #ifndef vtkModifiedBSPTree_h
147 #define vtkModifiedBSPTree_h
149 #include "vtkFiltersFlowPathsModule.h"
153 class Sorted_cell_extents_Lists;
203 double p1[3],
double p2[3],
double tol,
double &t,
double x[3],
204 double pcoords[3],
int &subId,
vtkIdType &cellId);
211 double p1[3],
double p2[3],
double tol,
double &t,
double x[3],
223 const double p1[3],
const double p2[3],
const double tol,
231 double pcoords[3],
double *weights);
261 const double tol,
double &t,
double ipt[3],
double pcoords[3],
int &subId);
275 #ifndef DOXYGEN_SHOULD_SKIP_THIS
287 for (
int i=0; i<3; i++)
delete mChild[i];
291 void setMin(
double minx,
double miny,
double minz) {
295 void setMax(
double maxx,
double maxy,
double maxz) {
318 double &rTmin,
double &rTmax)
const;
324 const double bounds[6],
const double origin[3],
const double dir[3],
double &rTmin,
double &rTmax);
bool RayMinMaxT(const double origin[3], const double dir[3], double &rTmin, double &rTmax) const
void setMin(double minx, double miny, double minz)
void setMax(double maxx, double maxy, double maxz)
static bool VTKFILTERSFLOWPATHS_EXPORT RayMinMaxT(const double bounds[6], const double origin[3], const double dir[3], double &rTmin, double &rTmax)
void Classify(const double origin[3], const double dir[3], double &rDist, BSPNode *&Near, BSPNode *&Mid, BSPNode *&Far) const
static int VTKFILTERSFLOWPATHS_EXPORT getDominantAxis(const double dir[3])
bool Inside(double point[3]) const
vtkIdType * sorted_cell_lists[6]
friend class vtkParticleBoxTree
an abstract base class for locators which find cells
virtual vtkIdType FindCell(double x[3])
Returns the Id of the cell containing the point, returns -1 if no cell found.
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.
abstract class to specify dataset behavior
provides thread-safe access to cells
maintain an unordered list of dataarray objects
list of point or cell ids
a simple class to control print indentation
Generate axis aligned BBox tree for raycasting and other Locator based searches.
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)
void FreeSearchStructure()
Free tree memory.
virtual int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId, vtkIdType &cellId, vtkGenericCell *cell)
Return intersection point (if any) AND the cell which was intersected by the finite line.
virtual int IntersectWithLine(const double p1[3], const double p2[3], const double tol, vtkPoints *points, vtkIdList *cellIds)
Take the passed line segment and intersect it with the data set.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual void GenerateRepresentation(int level, vtkPolyData *pd)
Generate BBox representation of Nth level.
void BuildLocator()
Build Tree.
vtkIdListCollection * GetLeafNodeCellInformation()
After subdivision has completed, one may wish to query the tree to find which cells are in which leaf...
bool InsideCellBounds(double x[3], vtkIdType cell_ID)
Quickly test if a point is inside the bounds of a particular cell.
void BuildLocatorIfNeeded()
virtual int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId, vtkIdType &cellId)
Return intersection point (if any) AND the cell which was intersected by the finite line.
virtual void GenerateRepresentationLeafs(vtkPolyData *pd)
Generate BBox representation of all leaf nodes.
void Subdivide(BSPNode *node, Sorted_cell_extents_Lists *lists, vtkDataSet *dataSet, vtkIdType nCells, int depth, int maxlevel, vtkIdType maxCells, int &MaxDepth)
static vtkModifiedBSPTree * New()
Construct with maximum 32 cells per node.
void BuildLocatorInternal()
virtual vtkIdType FindCell(double x[3], double tol2, vtkGenericCell *GenCell, double pcoords[3], double *weights)
Test a point to find if it is inside a cell.
represent and manipulate 3D points
concrete dataset represents vertices, lines, polygons, and triangle strips