143 #ifndef vtkModifiedBSPTree_h
144 #define vtkModifiedBSPTree_h
146 #include "vtkFiltersFlowPathsModule.h"
150 class Sorted_cell_extents_Lists;
183 void BuildLocator() VTK_OVERRIDE;
193 virtual
void GenerateRepresentationLeafs(
vtkPolyData *pd);
199 int IntersectWithLine(
200 double p1[3],
double p2[3],
double tol,
double &t,
double x[3],
201 double pcoords[3],
int &subId,
vtkIdType &cellId) VTK_OVERRIDE;
207 int IntersectWithLine(
208 double p1[3],
double p2[3],
double tol,
double &t,
double x[3],
219 virtual
int IntersectWithLine(
220 const
double p1[3], const
double p2[3], const
double tol,
228 double pcoords[3],
double *weights) VTK_OVERRIDE;
230 bool InsideCellBounds(
double x[3],
vtkIdType cell_ID) VTK_OVERRIDE;
241 ~vtkModifiedBSPTree() VTK_OVERRIDE;
250 void Subdivide(
BSPNode *node, Sorted_cell_extents_Lists *lists,
vtkDataSet *dataSet,
257 virtual
int IntersectCellInternal(
vtkIdType cell_ID, const
double p1[3], const
double p2[3],
258 const
double tol,
double &t,
double ipt[3],
double pcoords[3],
int &subId);
260 void BuildLocatorIfNeeded();
261 void ForceBuildLocator();
262 void BuildLocatorInternal();
264 vtkModifiedBSPTree(const vtkModifiedBSPTree&) VTK_DELETE_FUNCTION;
265 void operator=(const vtkModifiedBSPTree&) VTK_DELETE_FUNCTION;
272 #ifndef DOXYGEN_SHOULD_SKIP_THIS
278 mChild[0] = mChild[1] = mChild[2] = NULL;
279 for (
int i=0; i<6; i++) sorted_cell_lists[i] = NULL;
284 for (
int i=0; i<3; i++)
delete mChild[i];
285 for (
int i=0; i<6; i++)
delete []sorted_cell_lists[i];
288 void setMin(
double minx,
double miny,
double minz) {
289 this->Bounds[0] = minx; this->Bounds[2] = miny; this->Bounds[4] = minz;
292 void setMax(
double maxx,
double maxy,
double maxz) {
293 this->Bounds[1] = maxx; this->Bounds[3] = maxy; this->Bounds[5] = maxz;
296 bool Inside(
double point[3])
const;
311 void Classify(
const double origin[3],
const double dir[3],
314 bool RayMinMaxT(
const double origin[3],
const double dir[3],
315 double &rTmin,
double &rTmax)
const;
317 friend class vtkModifiedBSPTree;
318 friend class vtkParticleBoxTree;
320 static bool VTKFILTERSFLOWPATHS_EXPORT RayMinMaxT(
321 const double bounds[6],
const double origin[3],
const double dir[3],
double &rTmin,
double &rTmax);
322 static int VTKFILTERSFLOWPATHS_EXPORT getDominantAxis(
const double dir[3]);
abstract class to specify dataset behavior
an abstract base class for locators which find cells
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
void setMax(double maxx, double maxy, double maxz)
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
void setMin(double minx, double miny, double minz)
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.
maintain an ordered list of IdList objects
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
represent and manipulate 3D points
Generate axis aligned BBox tree for raycasting and other Locator based searches.