50 #include "vtkCommonDataModelModule.h"
53 VTK_ABI_NAMESPACE_BEGIN
88 vtkSetMacro(MinCells,
int);
89 vtkGetMacro(MinCells,
int);
99 vtkGetMacro(NumberOfRegionsOrLess,
int);
100 vtkSetMacro(NumberOfRegionsOrLess,
int);
109 vtkGetMacro(NumberOfRegionsOrMore,
int);
110 vtkSetMacro(NumberOfRegionsOrMore,
int);
119 vtkGetMacro(FudgeFactor,
double);
120 vtkSetMacro(FudgeFactor,
double);
140 void OmitXPartitioning();
145 void OmitYPartitioning();
150 void OmitZPartitioning();
155 void OmitXYPartitioning();
160 void OmitYZPartitioning();
165 void OmitZXPartitioning();
170 void OmitNoPartitioning();
198 virtual void RemoveDataSet(
int index);
200 virtual void RemoveAllDataSets();
206 int GetNumberOfDataSets();
252 void SetNewBounds(
double* bounds);
258 vtkGetMacro(NumberOfRegions,
int);
264 void GetRegionBounds(
int regionID,
double bounds[6]);
269 void GetRegionDataBounds(
int regionID,
double bounds[6]);
276 void PrintVerboseTree();
282 void PrintRegion(
int id);
296 void CreateCellLists(
int dataSetIndex,
int* regionReqList,
int reqListSize);
297 void CreateCellLists(
vtkDataSet* set,
int* regionReqList,
int reqListSize);
298 void CreateCellLists(
int* regionReqList,
int listSize);
299 void CreateCellLists();
309 vtkSetMacro(IncludeRegionBoundaryCells,
vtkTypeBool);
310 vtkGetMacro(IncludeRegionBoundaryCells,
vtkTypeBool);
311 vtkBooleanMacro(IncludeRegionBoundaryCells,
vtkTypeBool);
317 void DeleteCellLists();
335 vtkIdList* GetBoundaryCellList(
int regionID);
374 int GetRegionContainingCell(
int set,
vtkIdType cellID);
375 int GetRegionContainingCell(
vtkIdType cellID);
386 int* AllGetRegionContainingCell();
391 int GetRegionContainingPoint(
double x,
double y,
double z);
419 int MinimalNumberOfConvexSubRegions(
vtkIntArray* regionIdList,
double** convexRegionBounds);
428 int ViewOrderAllRegionsInDirection(
429 const double directionOfProjection[3],
vtkIntArray* orderedList);
438 int ViewOrderRegionsInDirection(
448 int ViewOrderAllRegionsFromPosition(
449 const double directionOfProjection[3],
vtkIntArray* orderedList);
458 int ViewOrderRegionsFromPosition(
475 void BuildLocatorFromPoints(
vtkPointSet* pointset);
476 void BuildLocatorFromPoints(
vtkPoints* ptArray);
477 void BuildLocatorFromPoints(
vtkPoints** ptArray,
int numPtArrays);
503 vtkIdType FindPoint(
double x,
double y,
double z);
512 vtkIdType FindClosestPoint(
double* x,
double& dist2);
513 vtkIdType FindClosestPoint(
double x,
double y,
double z,
double& dist2);
521 vtkIdType FindClosestPointWithinRadius(
double radius,
const double x[3],
double& dist2);
529 vtkIdType FindClosestPointInRegion(
int regionId,
double* x,
double& dist2);
530 vtkIdType FindClosestPointInRegion(
int regionId,
double x,
double y,
double z,
double& dist2);
539 void FindPointsWithinRadius(
double R,
const double x[3],
vtkIdList* result);
549 void FindClosestNPoints(
int N,
const double x[3],
vtkIdList* result);
583 vtkBooleanMacro(GenerateRepresentationUsingDataBounds,
vtkTypeBool);
584 vtkSetMacro(GenerateRepresentationUsingDataBounds,
vtkTypeBool);
585 vtkGetMacro(GenerateRepresentationUsingDataBounds,
vtkTypeBool);
591 virtual void PrintTiming(ostream& os,
vtkIndent indent);
597 virtual int NewGeometry();
604 virtual int NewGeometry(
vtkDataSet** sets,
int numDataSets);
611 virtual void InvalidateGeometry();
626 void FindPointsInArea(
double* area,
vtkIdTypeArray* ids,
bool clearArray =
true);
639 int ProcessUserDefinedCuts(
double* bounds);
641 void SetCuts(
vtkBSPCuts* cuts,
int userDefined);
648 void UpdateBuildTime();
657 int DivideTest(
int numberOfPoints,
int level);
673 static void DeleteAllDescendants(
vtkKdNode* nd);
675 void BuildRegionList();
676 virtual int SelectCutDirection(
vtkKdNode* kd);
697 int GetNumberOfCells();
704 int GetDataSetsNumberOfCells(
int set1,
int set2);
724 float* ComputeCellCenters();
725 float* ComputeCellCenters(
int set);
735 void UpdateProgress(
double amount);
741 vtkSetClampMacro(Progress,
double, 0.0, 1.0);
742 vtkGetMacro(Progress,
double);
755 void UpdateSubOperationProgress(
double amount);
757 static void SetNewBounds_(
vtkKdNode* kd,
double* b,
int* fixDim);
760 static void SetDataBoundsToSpatialBounds(
vtkKdNode* kd);
761 static void ZeroNumberOfPoints(
vtkKdNode* kd);
764 void FindPointsWithinRadius(
vtkKdNode* node,
double R2,
const double x[3],
vtkIdList* ids);
775 int DivideRegion(
vtkKdNode* kd,
float* c1,
int* ids,
int nlevels);
777 void DoMedianFind(
vtkKdNode* kd,
float* c1,
int* ids,
int d1,
int d2,
int d3);
791 void InitializeCellLists();
794 void ComputeCellCenter(
vtkCell* cell,
double*
center,
double* weights);
797 void _generateRepresentationDataBounds(
801 void _generateRepresentationWholeSpace(
806 void printTree_(
int verbose);
808 int SearchNeighborsForDuplicate(
809 int regionId,
float*
point,
int** pointsSoFar,
int* len,
float tolerance,
float tolerance2);
811 int SearchRegionForDuplicate(
float*
point,
int* pointsSoFar,
int len,
float tolerance2);
813 int FindClosestPointInRegion_(
int regionId,
double x,
double y,
double z,
double& dist2);
815 int FindClosestPointInSphere(
816 double x,
double y,
double z,
double radius,
int skipRegion,
double& dist2);
818 int ViewOrderRegionsInDirection_(
824 int ViewOrderRegionsFromPosition_(
828 vtkIntArray* IdsOfInterest,
const double pos[3],
int nextId);
833 void SetInputDataInfo(
int i,
int dims[3],
double origin[3],
double spacing[3]);
834 int CheckInputDataInfo(
int i,
int dims[3],
double origin[3],
double spacing[3]);
835 void ClearLastBuildCache();
837 static void printTree_P(
vtkKdNode* kd,
int depth,
int verbose);
839 static int MidValue(
int dim,
float* c1,
int nvals,
double& coord);
841 static int Select(
int dim,
float* c1,
int* ids,
int nvals,
double& coord);
842 static float FindMaxLeftHalf(
int dim,
float* c1,
int K);
843 static void Select_(
int dim,
float* X,
int* ids,
int L,
int R,
int K);
846 static int SelfOrder(
int id,
vtkKdNode* kd);
847 static int findRegion(
vtkKdNode* node,
float x,
float y,
float z);
848 static int findRegion(
vtkKdNode* node,
double x,
double y,
double z);
852 static void AddNewRegions(
vtkKdNode* kd,
float* c1,
int midpt,
int dim,
double coord);
854 void NewPartitioningRequest(
int req);
860 double CellBoundsCache[6];
904 void operator=(
const vtkKdTree&) =
delete;
906 VTK_ABI_NAMESPACE_END
virtual void BuildLocator()=0
Build the locator from the input dataset.
void GetBounds(T a, double bds[6])
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
concrete class for storing a set of points
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
virtual void BuildLocatorInternal()
This function is not pure virtual to maintain backwards compatibility.
list of point or cell ids
vtkIdType * LastNumPoints
vtkTypeBool GenerateRepresentationUsingDataBounds
object to represent cell connectivity
a Kd-tree spatial decomposition of a set of points
vtkIdList ** boundaryCells
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
virtual void ForceBuildLocator()
Build the locator from the input dataset (even if UseExistingSearchStructure is on).
int NumberOfRegionsOrMore