145 #ifndef _vtkModifiedBSPTree_h
146 #define _vtkModifiedBSPTree_h
148 #include "vtkFiltersFlowPathsModule.h"
149 #include "vtkAbstractCellLocator.h"
150 #include "vtkSmartPointer.h"
153 class Sorted_cell_extents_Lists;
157 class vtkIdListCollection;
165 void PrintSelf(ostream& os, vtkIndent indent);
172 using vtkAbstractCellLocator::IntersectWithLine;
173 using vtkAbstractCellLocator::FindClosestPoint;
174 using vtkAbstractCellLocator::FindClosestPointWithinRadius;
178 void FreeSearchStructure();
185 virtual void GenerateRepresentation(
int level,
vtkPolyData *pd);
188 virtual void GenerateRepresentationLeafs(
vtkPolyData *pd);
194 double p1[3],
double p2[3],
double tol,
double& t,
double x[3],
195 double pcoords[3],
int &subId)
196 {
return this->Superclass::IntersectWithLine(p1, p2, tol, t, x, pcoords, subId); }
202 virtual int IntersectWithLine(
203 double p1[3],
double p2[3],
double tol,
double &t,
double x[3],
204 double pcoords[3],
int &subId, vtkIdType &cellId);
211 virtual int IntersectWithLine(
212 double p1[3],
double p2[3],
double tol,
double &t,
double x[3],
213 double pcoords[3],
int &subId, vtkIdType &cellId,
vtkGenericCell *cell);
227 const double p1[3],
const double p2[3],
228 vtkPoints *points, vtkIdList *cellIds)
229 {
return this->Superclass::IntersectWithLine(p1, p2, points, cellIds); }
239 virtual int IntersectWithLine(
240 const double p1[3],
const double p2[3],
const double tol,
241 vtkPoints *points, vtkIdList *cellIds);
248 {
return this->Superclass::FindCell(x); }
254 virtual vtkIdType FindCell(
double x[3],
double tol2,
vtkGenericCell *GenCell,
255 double pcoords[3],
double *weights);
258 bool InsideCellBounds(
double x[3], vtkIdType cell_ID);
263 vtkIdListCollection *GetLeafNodeCellInformation();
277 void Subdivide(
BSPNode *node, Sorted_cell_extents_Lists *lists, vtkDataSet *dataSet,
278 vtkIdType nCells,
int depth,
int maxlevel, vtkIdType maxCells,
int &MaxDepth);
284 virtual int IntersectCellInternal(vtkIdType cell_ID,
const double p1[3],
const double p2[3],
285 const double tol,
double &t,
double ipt[3],
double pcoords[3],
int &subId);
288 void BuildLocatorIfNeeded();
289 void ForceBuildLocator();
290 void BuildLocatorInternal();
302 #ifndef DOXYGEN_SHOULD_SKIP_THIS
310 for (
int i=0; i<3; i++) {
bounds[i*2] = VTK_FLOAT_MAX;
bounds[i*2+1] = -VTK_FLOAT_MAX; }
314 for (
int i=0; i<3; i++)
if (
mChild[i])
delete mChild[i];
318 void setMin(
double minx,
double miny,
double minz) {
322 void setMax(
double maxx,
double maxy,
double maxz) {
326 bool Inside(
double point[3])
const;
341 void Classify(
const double origin[3],
const double dir[3],
344 bool RayMinMaxT(
const double origin[3],
const double dir[3],
345 double &rTmin,
double &rTmax)
const;
350 static bool VTKFILTERSFLOWPATHS_EXPORT
RayMinMaxT(
351 const double bounds[6],
const double origin[3],
const double dir[3],
double &rTmin,
double &rTmax);
352 static int VTKFILTERSFLOWPATHS_EXPORT
getDominantAxis(
const double dir[3]);
virtual int IntersectWithLine(const double p1[3], const double p2[3], vtkPoints *points, vtkIdList *cellIds)
bool Inside(double point[3]) const
virtual vtkIdType FindCell(double x[3])
static int VTKFILTERSFLOWPATHS_EXPORT getDominantAxis(const double dir[3])
void Classify(const double origin[3], const double dir[3], double &rDist, BSPNode *&Near, BSPNode *&Mid, BSPNode *&Far) const
concrete dataset represents vertices, lines, polygons, and triangle strips
provides thread-safe access to cells
bool RayMinMaxT(const double origin[3], const double dir[3], double &rTmin, double &rTmax) const
void setMax(double maxx, double maxy, double maxz)
virtual int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)
friend class vtkParticleBoxTree
void setMin(double minx, double miny, double minz)
vtkIdType * sorted_cell_lists[6]
Generate axis aligned BBox tree for raycasting and other Locator based searches.