59 #include "vtkCommonDataModelModule.h"
96 vtkSetMacro(MinCells,
int);
97 vtkGetMacro(MinCells,
int);
107 vtkGetMacro(NumberOfRegionsOrLess,
int);
108 vtkSetMacro(NumberOfRegionsOrLess,
int);
117 vtkGetMacro(NumberOfRegionsOrMore,
int);
118 vtkSetMacro(NumberOfRegionsOrMore,
int);
127 vtkGetMacro(FudgeFactor,
double);
128 vtkSetMacro(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();
319 vtkSetMacro(IncludeRegionBoundaryCells,
vtkTypeBool);
320 vtkGetMacro(IncludeRegionBoundaryCells,
vtkTypeBool);
321 vtkBooleanMacro(IncludeRegionBoundaryCells,
vtkTypeBool);
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);
593 vtkBooleanMacro(GenerateRepresentationUsingDataBounds,
vtkTypeBool);
594 vtkSetMacro(GenerateRepresentationUsingDataBounds,
vtkTypeBool);
595 vtkGetMacro(GenerateRepresentationUsingDataBounds,
vtkTypeBool);
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);
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 SetInputDataInfo(
int i,
851 int dims[3],
double origin[3],
double spacing[3]);
852 int CheckInputDataInfo(
int i,
853 int dims[3],
double origin[3],
double spacing[3]);
854 void ClearLastBuildCache();
856 static void __printTree(
vtkKdNode *kd,
int depth,
int verbose);
858 static int MidValue(
int dim,
float *c1,
int nvals,
double &coord);
860 static int Select(
int dim,
float *c1,
int *ids,
int nvals,
double &coord);
861 static float FindMaxLeftHalf(
int dim,
float *c1,
int K);
862 static void _Select(
int dim,
float *X,
int *ids,
int L,
int R,
int K);
865 static int SelfOrder(
int id,
vtkKdNode *kd);
866 static int findRegion(
vtkKdNode *node,
float x,
float y,
float z);
867 static int findRegion(
vtkKdNode *node,
double x,
double y,
double z);
872 static void AddNewRegions(
vtkKdNode *kd,
float *c1,
873 int midpt,
int dim,
double coord);
875 void NewPartitioningRequest(
int req);
881 double CellBoundsCache[6];
925 void operator=(
const vtkKdTree&) =
delete;