191#ifndef vtkModifiedBSPTree_h
192#define vtkModifiedBSPTree_h
195#include "vtkFiltersFlowPathsModule.h"
198VTK_ABI_NAMESPACE_BEGIN
199class Sorted_cell_extents_Lists;
231 int IntersectWithLine(
const double p1[3],
const double p2[3],
double tol,
double& t,
double x[3],
255 const double p1[3],
const double p2[3],
double tolerance,
vtkIdList* cellsIds)
override
257 this->Superclass::FindCellsAlongLine(p1, p2, tolerance, cellsIds);
268 double pcoords[3],
double* weights)
override;
322#ifndef DOXYGEN_SHOULD_SKIP_THIS
330 mChild[0] = mChild[1] = mChild[2] =
nullptr;
331 for (
int i = 0; i < 6; i++)
332 sorted_cell_lists[i] =
nullptr;
333 for (
int i = 0; i < 3; i++)
342 for (
int i = 0; i < 3; i++)
344 for (
int i = 0; i < 6; i++)
345 delete[] sorted_cell_lists[i];
348 void setMin(
double minx,
double miny,
double minz)
350 this->Bounds[0] = minx;
351 this->Bounds[2] = miny;
352 this->Bounds[4] = minz;
355 void setMax(
double maxx,
double maxy,
double maxz)
357 this->Bounds[1] = maxx;
358 this->Bounds[3] = maxy;
359 this->Bounds[5] = maxz;
362 bool Inside(
double point[3])
const;
378 void Classify(
const double origin[3],
const double dir[3],
double& rDist, BSPNode*& Near,
379 BSPNode*& Mid, BSPNode*& Far)
const;
383 static int VTKFILTERSFLOWPATHS_EXPORT getDominantAxis(
const double dir[3]);
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(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.
abstract class to specify dataset behavior
provides thread-safe access to cells
maintain an ordered list of IdList objects
list of point or cell ids
a simple class to control print indentation
Generate axis aligned BBox tree for ray-casting and other Locator based searches.
int IntersectWithLine(const double p1[3], const double p2[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.
void FindCellsAlongLine(const double p1[3], const double p2[3], double tolerance, vtkIdList *cellsIds) override
Take the passed line segment and intersect it with the data set.
void ShallowCopy(vtkAbstractCellLocator *locator) override
Shallow copy of a vtkModifiedBSPTree.
std::shared_ptr< BSPNode > mRoot
~vtkModifiedBSPTree() override
void GenerateRepresentation(int level, vtkPolyData *pd) override
Satisfy vtkLocator abstract interface.
int IntersectWithLine(const double p1[3], const double p2[3], double tol, vtkPoints *points, vtkIdList *cellIds, vtkGenericCell *cell) override
Take the passed line segment and intersect it with the data set.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods to print and obtain type-related information.
vtkIdListCollection * GetLeafNodeCellInformation()
After subdivision has completed, one may wish to query the tree to find which cells are in which leaf...
vtkIdType FindCell(double x[3], double vtkNotUsed(tol2), vtkGenericCell *GenCell, int &subId, double pcoords[3], double *weights) override
Find the cell containing a given point.
void BuildLocatorInternal() override
This function is not pure virtual to maintain backwards compatibility.
void ForceBuildLocator() override
Satisfy vtkLocator abstract interface.
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)
void FreeSearchStructure() override
Satisfy vtkLocator abstract interface.
void BuildLocator() override
Satisfy vtkLocator abstract interface.
static vtkModifiedBSPTree * New()
Construct with maximum 32 cells per node.
represent and manipulate 3D points
concrete dataset represents vertices, lines, polygons, and triangle strips