59 #include "vtkCommonDataModelModule.h"
89 vtkGetMacro(Timing,
int);
97 vtkGetMacro(MinCells,
int);
107 vtkGetMacro(NumberOfRegionsOrLess,
int);
117 vtkGetMacro(NumberOfRegionsOrMore,
int);
127 vtkGetMacro(FudgeFactor,
double);
148 void OmitXPartitioning();
153 void OmitYPartitioning();
158 void OmitZPartitioning();
163 void OmitXYPartitioning();
168 void OmitYZPartitioning();
173 void OmitZXPartitioning();
178 void OmitNoPartitioning();
206 virtual void RemoveDataSet(
int index);
208 virtual void RemoveAllDataSets();
214 int GetNumberOfDataSets();
250 void GetBounds(
double *bounds);
260 void SetNewBounds(
double *bounds);
266 vtkGetMacro(NumberOfRegions,
int);
272 void GetRegionBounds(
int regionID,
double bounds[6]);
277 void GetRegionDataBounds(
int regionID,
double bounds[6]);
284 void PrintVerboseTree();
290 void PrintRegion(
int id);
304 void CreateCellLists(
int dataSetIndex,
int *regionReqList,
306 void CreateCellLists(
vtkDataSet *set,
int *regionReqList,
308 void CreateCellLists(
int *regionReqList,
int listSize);
309 void CreateCellLists();
320 vtkGetMacro(IncludeRegionBoundaryCells,
int);
327 void DeleteCellLists();
345 vtkIdList *GetBoundaryCellList(
int regionID);
384 int GetRegionContainingCell(
int set,
vtkIdType cellID);
385 int GetRegionContainingCell(
vtkIdType cellID);
396 int *AllGetRegionContainingCell();
401 int GetRegionContainingPoint(
double x,
double y,
double z);
424 int MinimalNumberOfConvexSubRegions(
vtkIntArray *regionIdList,
425 double **convexRegionBounds);
434 int ViewOrderAllRegionsInDirection(const
double directionOfProjection[3],
444 int ViewOrderRegionsInDirection(
vtkIntArray *regionIds,
445 const
double directionOfProjection[3],
455 int ViewOrderAllRegionsFromPosition(const
double directionOfProjection[3],
465 int ViewOrderRegionsFromPosition(
vtkIntArray *regionIds,
466 const
double directionOfProjection[3],
483 void BuildLocatorFromPoints(
vtkPointSet *pointset);
484 void BuildLocatorFromPoints(
vtkPoints *ptArray);
485 void BuildLocatorFromPoints(
vtkPoints **ptArray,
int numPtArrays);
511 vtkIdType FindPoint(
double x,
double y,
double z);
520 vtkIdType FindClosestPoint(
double *x,
double &dist2);
521 vtkIdType FindClosestPoint(
double x,
double y,
double z,
double &dist2);
530 double radius, const
double x[3],
double& dist2);
538 vtkIdType FindClosestPointInRegion(
int regionId,
double *x,
double &dist2);
539 vtkIdType FindClosestPointInRegion(
int regionId,
double x,
double y,
double z,
549 void FindPointsWithinRadius(
double R, const
double x[3],
vtkIdList *result);
559 void FindClosestNPoints(
int N, const
double x[3],
vtkIdList *result);
571 void FreeSearchStructure() VTK_OVERRIDE;
584 void GenerateRepresentation(
int *regionList,
int len,
vtkPolyData *pd);
594 vtkSetMacro(GenerateRepresentationUsingDataBounds,
int);
595 vtkGetMacro(GenerateRepresentationUsingDataBounds,
int);
601 virtual
void PrintTiming(ostream& os,
vtkIndent indent);
607 virtual
int NewGeometry();
614 virtual
int NewGeometry(
vtkDataSet **sets,
int numDataSets);
621 virtual
void InvalidateGeometry();
636 void FindPointsInArea(
double* area,
vtkIdTypeArray* ids,
bool clearArray = true);
641 ~vtkKdTree() VTK_OVERRIDE;
648 int ProcessUserDefinedCuts(
double *bounds);
650 void SetCuts(
vtkBSPCuts *cuts,
int userDefined);
657 void UpdateBuildTime();
666 int DivideTest(
int numberOfPoints,
int level);
681 static void DeleteAllDescendants(
vtkKdNode *nd);
683 void BuildRegionList();
684 virtual int SelectCutDirection(
vtkKdNode *kd);
706 int GetNumberOfCells();
713 int GetDataSetsNumberOfCells(
int set1,
int set2);
733 float *ComputeCellCenters();
734 float *ComputeCellCenters(
int set);
744 void UpdateProgress(
double amount);
750 vtkSetClampMacro(Progress,
double,0.0,1.0);
751 vtkGetMacro(Progress,
double);
765 void UpdateSubOperationProgress(
double amount);
767 static void _SetNewBounds(
vtkKdNode *kd,
double *b,
int *fixDim);
770 static void SetDataBoundsToSpatialBounds(
vtkKdNode *kd);
771 static void ZeroNumberOfPoints(
vtkKdNode *kd);
774 void FindPointsWithinRadius(
vtkKdNode* node,
double R2,
786 int DivideRegion(
vtkKdNode *kd,
float *c1,
int *ids,
int nlevels);
788 void DoMedianFind(
vtkKdNode *kd,
float *c1,
int *ids,
int d1,
int d2,
int d3);
801 void InitializeCellLists();
804 void ComputeCellCenter(
vtkCell* cell,
double *
center,
double *weights);
816 void _printTree(
int verbose);
818 int SearchNeighborsForDuplicate(
int regionId,
float *
point,
819 int **pointsSoFar,
int *len,
820 float tolerance,
float tolerance2);
822 int SearchRegionForDuplicate(
float *
point,
int *pointsSoFar,
823 int len,
float tolerance2);
825 int _FindClosestPointInRegion(
int regionId,
826 double x,
double y,
double z,
double &dist2);
828 int FindClosestPointInSphere(
double x,
double y,
double z,
double radius,
829 int skipRegion,
double &dist2);
831 int _ViewOrderRegionsInDirection(
vtkIntArray *IdsOfInterest,
837 const double dir[3],
int nextId);
839 int _ViewOrderRegionsFromPosition(
vtkIntArray *IdsOfInterest,
845 const double pos[3],
int nextId);
850 void NewParitioningRequest(
int req);
851 void SetInputDataInfo(
int i,
852 int dims[3],
double origin[3],
double spacing[3]);
853 int CheckInputDataInfo(
int i,
854 int dims[3],
double origin[3],
double spacing[3]);
855 void ClearLastBuildCache();
857 static void __printTree(
vtkKdNode *kd,
int depth,
int verbose);
859 static int MidValue(
int dim,
float *c1,
int nvals,
double &coord);
861 static int Select(
int dim,
float *c1,
int *ids,
int nvals,
double &coord);
862 static float FindMaxLeftHalf(
int dim,
float *c1,
int K);
863 static void _Select(
int dim,
float *X,
int *ids,
int L,
int R,
int K);
866 static int SelfOrder(
int id,
vtkKdNode *kd);
867 static int findRegion(
vtkKdNode *node,
float x,
float y,
float z);
868 static int findRegion(
vtkKdNode *node,
double x,
double y,
double z);
873 static void AddNewRegions(
vtkKdNode *kd,
float *c1,
874 int midpt,
int dim,
double coord);
876 void NewPartitioningRequest(
int req);
882 double CellBoundsCache[6];
926 void operator=(const
vtkKdTree&) VTK_DELETE_FUNCTION;
virtual void BuildLocator()=0
Build the locator from the input dataset.
vtkDataSet ** LastInputDataSets
maintain an unordered list of dataset objects
This class represents a single spatial region in an 3D axis aligned binary spatial partitioning...
Perform calculations (mostly intersection calculations) on regions of a 3D binary spatial partitionin...
This class represents an axis-aligned Binary Spatial Partitioning of a 3D space.
abstract class to specify dataset behavior
int NumberOfLocatorPoints
static int ComputeLevel(vtkKdNode *kd)
abstract base class for objects that accelerate spatial searches
void PrintSelf(ostream &os, vtkIndent indent) override
Standard type and print methods.
int NumberOfRegionsOrLess
abstract class for specifying dataset behavior
vtkDataSet * GetDataSet() override
Return the 0'th data set.
dynamic, self-adjusting array of vtkIdType
concrete dataset represents vertices, lines, polygons, and triangle strips
double * LastInputDataInfo
Timer support and logging.
virtual void SetDataSet(vtkDataSet *)
Build the locator from the points/cells defining this dataset.
abstract class to specify cell behavior
unsigned long * LastDataSetObserverTags
dynamic, self-adjusting array of int
virtual vtkDataSet * GetDataSet()
Build the locator from the points/cells defining this dataset.
a simple class to control print indentation
list of point or cell ids
vtkIdType * LastNumPoints
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
object to represent cell connectivity
vtkIdList ** boundaryCells
a Kd-tree spatial decomposition of a set of points
int IncludeRegionBoundaryCells
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
int * LocatorRegionLocation
int GenerateRepresentationUsingDataBounds
vtkDataSetCollection * DataSets
represent and manipulate 3D points
int NumberOfRegionsOrMore