62 #include "vtkCommonDataModelModule.h" 99 vtkSetMacro(MinCells,
int);
100 vtkGetMacro(MinCells,
int);
110 vtkGetMacro(NumberOfRegionsOrLess,
int);
111 vtkSetMacro(NumberOfRegionsOrLess,
int);
120 vtkGetMacro(NumberOfRegionsOrMore,
int);
121 vtkSetMacro(NumberOfRegionsOrMore,
int);
130 vtkGetMacro(FudgeFactor,
double);
131 vtkSetMacro(FudgeFactor,
double);
151 void OmitXPartitioning();
156 void OmitYPartitioning();
161 void OmitZPartitioning();
166 void OmitXYPartitioning();
171 void OmitYZPartitioning();
176 void OmitZXPartitioning();
181 void OmitNoPartitioning();
209 virtual void RemoveDataSet(
int index);
211 virtual void RemoveAllDataSets();
217 int GetNumberOfDataSets();
253 void GetBounds(
double *bounds);
263 void SetNewBounds(
double *bounds);
269 vtkGetMacro(NumberOfRegions,
int);
275 void GetRegionBounds(
int regionID,
double bounds[6]);
280 void GetRegionDataBounds(
int regionID,
double bounds[6]);
287 void PrintVerboseTree();
293 void PrintRegion(
int id);
307 void CreateCellLists(
int dataSetIndex,
int *regionReqList,
309 void CreateCellLists(
vtkDataSet *
set,
int *regionReqList,
311 void CreateCellLists(
int *regionReqList,
int listSize);
312 void CreateCellLists();
322 vtkSetMacro(IncludeRegionBoundaryCells,
vtkTypeBool);
323 vtkGetMacro(IncludeRegionBoundaryCells,
vtkTypeBool);
324 vtkBooleanMacro(IncludeRegionBoundaryCells,
vtkTypeBool);
330 void DeleteCellLists();
348 vtkIdList *GetBoundaryCellList(
int regionID);
387 int GetRegionContainingCell(
int set,
vtkIdType cellID);
388 int GetRegionContainingCell(
vtkIdType cellID);
399 int *AllGetRegionContainingCell();
404 int GetRegionContainingPoint(
double x,
double y,
double z);
427 int MinimalNumberOfConvexSubRegions(
vtkIntArray *regionIdList,
428 double **convexRegionBounds);
437 int ViewOrderAllRegionsInDirection(
const double directionOfProjection[3],
447 int ViewOrderRegionsInDirection(
vtkIntArray *regionIds,
448 const double directionOfProjection[3],
458 int ViewOrderAllRegionsFromPosition(
const double directionOfProjection[3],
468 int ViewOrderRegionsFromPosition(
vtkIntArray *regionIds,
469 const double directionOfProjection[3],
486 void BuildLocatorFromPoints(
vtkPointSet *pointset);
487 void BuildLocatorFromPoints(
vtkPoints *ptArray);
488 void BuildLocatorFromPoints(
vtkPoints **ptArray,
int numPtArrays);
514 vtkIdType FindPoint(
double x,
double y,
double z);
523 vtkIdType FindClosestPoint(
double *x,
double &dist2);
524 vtkIdType FindClosestPoint(
double x,
double y,
double z,
double &dist2);
533 double radius,
const double x[3],
double& dist2);
541 vtkIdType FindClosestPointInRegion(
int regionId,
double *x,
double &dist2);
542 vtkIdType FindClosestPointInRegion(
int regionId,
double x,
double y,
double z,
552 void FindPointsWithinRadius(
double R,
const double x[3],
vtkIdList *result);
562 void FindClosestNPoints(
int N,
const double x[3],
vtkIdList *result);
596 vtkBooleanMacro(GenerateRepresentationUsingDataBounds,
vtkTypeBool);
597 vtkSetMacro(GenerateRepresentationUsingDataBounds,
vtkTypeBool);
598 vtkGetMacro(GenerateRepresentationUsingDataBounds,
vtkTypeBool);
604 virtual void PrintTiming(ostream& os,
vtkIndent indent);
610 virtual int NewGeometry();
617 virtual int NewGeometry(
vtkDataSet **sets,
int numDataSets);
624 virtual void InvalidateGeometry();
639 void FindPointsInArea(
double* area,
vtkIdTypeArray* ids,
bool clearArray =
true);
651 int ProcessUserDefinedCuts(
double *bounds);
653 void SetCuts(
vtkBSPCuts *cuts,
int userDefined);
660 void UpdateBuildTime();
669 int DivideTest(
int numberOfPoints,
int level);
684 static void DeleteAllDescendants(
vtkKdNode *nd);
686 void BuildRegionList();
687 virtual int SelectCutDirection(
vtkKdNode *kd);
695 void GetRegionsAtLevel(
int level,
vtkKdNode **nodes);
709 int GetNumberOfCells();
716 int GetDataSetsNumberOfCells(
int set1,
int set2);
725 void ComputeCellCenter(
vtkDataSet *
set,
int cellId,
double *center);
736 float *ComputeCellCenters();
737 float *ComputeCellCenters(
int set);
747 void UpdateProgress(
double amount);
753 vtkSetClampMacro(Progress,
double,0.0,1.0);
754 vtkGetMacro(Progress,
double);
768 void UpdateSubOperationProgress(
double amount);
770 static void _SetNewBounds(
vtkKdNode *kd,
double *b,
int *fixDim);
773 static void SetDataBoundsToSpatialBounds(
vtkKdNode *kd);
774 static void ZeroNumberOfPoints(
vtkKdNode *kd);
777 void FindPointsWithinRadius(
vtkKdNode* node,
double R2,
789 int DivideRegion(
vtkKdNode *kd,
float *c1,
int *ids,
int nlevels);
791 void DoMedianFind(
vtkKdNode *kd,
float *c1,
int *ids,
int d1,
int d2,
int d3);
804 void InitializeCellLists();
807 void ComputeCellCenter(
vtkCell* cell,
double *center,
double *weights);
809 void GenerateRepresentationDataBounds(
int level,
vtkPolyData *pd);
813 void GenerateRepresentationWholeSpace(
int level,
vtkPolyData *pd);
819 void _printTree(
int verbose);
821 int SearchNeighborsForDuplicate(
int regionId,
float *
point,
822 int **pointsSoFar,
int *len,
823 float tolerance,
float tolerance2);
825 int SearchRegionForDuplicate(
float *
point,
int *pointsSoFar,
826 int len,
float tolerance2);
828 int _FindClosestPointInRegion(
int regionId,
829 double x,
double y,
double z,
double &dist2);
831 int FindClosestPointInSphere(
double x,
double y,
double z,
double radius,
832 int skipRegion,
double &dist2);
834 int _ViewOrderRegionsInDirection(
vtkIntArray *IdsOfInterest,
840 const double dir[3],
int nextId);
842 int _ViewOrderRegionsFromPosition(
vtkIntArray *IdsOfInterest,
848 const double pos[3],
int nextId);
853 void SetInputDataInfo(
int i,
854 int dims[3],
double origin[3],
double spacing[3]);
855 int CheckInputDataInfo(
int i,
856 int dims[3],
double origin[3],
double spacing[3]);
857 void ClearLastBuildCache();
859 static void __printTree(
vtkKdNode *kd,
int depth,
int verbose);
861 static int MidValue(
int dim,
float *c1,
int nvals,
double &coord);
863 static int Select(
int dim,
float *c1,
int *ids,
int nvals,
double &coord);
864 static float FindMaxLeftHalf(
int dim,
float *c1,
int K);
865 static void _Select(
int dim,
float *X,
int *ids,
int L,
int R,
int K);
868 static int SelfOrder(
int id,
vtkKdNode *kd);
869 static int findRegion(
vtkKdNode *node,
float x,
float y,
float z);
870 static int findRegion(
vtkKdNode *node,
double x,
double y,
double z);
875 static void AddNewRegions(
vtkKdNode *kd,
float *c1,
876 int midpt,
int dim,
double coord);
878 void NewPartitioningRequest(
int req);
884 double CellBoundsCache[6];
928 void operator=(
const vtkKdTree&) =
delete;
virtual void BuildLocator()=0
Build the locator from the input dataset.
vtkTypeBool IncludeRegionBoundaryCells
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
virtual void FreeSearchStructure()=0
Free the memory required for the spatial data structure.
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
vtkTypeBool GenerateRepresentationUsingDataBounds
object to represent cell connectivity
vtkIdList ** boundaryCells
a Kd-tree spatial decomposition of a set of points
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
int * LocatorRegionLocation
vtkDataSetCollection * DataSets
virtual void GenerateRepresentation(int level, vtkPolyData *pd)=0
Method to build a representation at a particular level.
vtkBSPIntersections * BSPCalculator
represent and manipulate 3D points
int NumberOfRegionsOrMore