65 #include "vtkCommonDataModelModule.h"
102 vtkSetMacro(MinCells,
int);
103 vtkGetMacro(MinCells,
int);
113 vtkGetMacro(NumberOfRegionsOrLess,
int);
114 vtkSetMacro(NumberOfRegionsOrLess,
int);
123 vtkGetMacro(NumberOfRegionsOrMore,
int);
124 vtkSetMacro(NumberOfRegionsOrMore,
int);
133 vtkGetMacro(FudgeFactor,
double);
134 vtkSetMacro(FudgeFactor,
double);
154 void OmitXPartitioning();
159 void OmitYPartitioning();
164 void OmitZPartitioning();
169 void OmitXYPartitioning();
174 void OmitYZPartitioning();
179 void OmitZXPartitioning();
184 void OmitNoPartitioning();
212 virtual void RemoveDataSet(
int index);
214 virtual void RemoveAllDataSets();
220 int GetNumberOfDataSets();
266 void SetNewBounds(
double* bounds);
272 vtkGetMacro(NumberOfRegions,
int);
278 void GetRegionBounds(
int regionID,
double bounds[6]);
283 void GetRegionDataBounds(
int regionID,
double bounds[6]);
290 void PrintVerboseTree();
296 void PrintRegion(
int id);
310 void CreateCellLists(
int dataSetIndex,
int* regionReqList,
int reqListSize);
311 void CreateCellLists(
vtkDataSet* set,
int* regionReqList,
int reqListSize);
312 void CreateCellLists(
int* regionReqList,
int listSize);
313 void CreateCellLists();
323 vtkSetMacro(IncludeRegionBoundaryCells,
vtkTypeBool);
324 vtkGetMacro(IncludeRegionBoundaryCells,
vtkTypeBool);
325 vtkBooleanMacro(IncludeRegionBoundaryCells,
vtkTypeBool);
331 void DeleteCellLists();
349 vtkIdList* GetBoundaryCellList(
int regionID);
388 int GetRegionContainingCell(
int set,
vtkIdType cellID);
389 int GetRegionContainingCell(
vtkIdType cellID);
400 int* AllGetRegionContainingCell();
405 int GetRegionContainingPoint(
double x,
double y,
double z);
433 int MinimalNumberOfConvexSubRegions(
vtkIntArray* regionIdList,
double** convexRegionBounds);
442 int ViewOrderAllRegionsInDirection(
443 const double directionOfProjection[3],
vtkIntArray* orderedList);
452 int ViewOrderRegionsInDirection(
462 int ViewOrderAllRegionsFromPosition(
463 const double directionOfProjection[3],
vtkIntArray* orderedList);
472 int ViewOrderRegionsFromPosition(
489 void BuildLocatorFromPoints(
vtkPointSet* pointset);
490 void BuildLocatorFromPoints(
vtkPoints* ptArray);
491 void BuildLocatorFromPoints(
vtkPoints** ptArray,
int numPtArrays);
517 vtkIdType FindPoint(
double x,
double y,
double z);
526 vtkIdType FindClosestPoint(
double* x,
double& dist2);
527 vtkIdType FindClosestPoint(
double x,
double y,
double z,
double& dist2);
535 vtkIdType FindClosestPointWithinRadius(
double radius,
const double x[3],
double& dist2);
543 vtkIdType FindClosestPointInRegion(
int regionId,
double* x,
double& dist2);
544 vtkIdType FindClosestPointInRegion(
int regionId,
double x,
double y,
double z,
double& dist2);
553 void FindPointsWithinRadius(
double R,
const double x[3],
vtkIdList* result);
563 void FindClosestNPoints(
int N,
const double x[3],
vtkIdList* result);
597 vtkBooleanMacro(GenerateRepresentationUsingDataBounds,
vtkTypeBool);
598 vtkSetMacro(GenerateRepresentationUsingDataBounds,
vtkTypeBool);
599 vtkGetMacro(GenerateRepresentationUsingDataBounds,
vtkTypeBool);
605 virtual void PrintTiming(ostream& os,
vtkIndent indent);
611 virtual int NewGeometry();
618 virtual int NewGeometry(
vtkDataSet** sets,
int numDataSets);
625 virtual void InvalidateGeometry();
640 void FindPointsInArea(
double* area,
vtkIdTypeArray* ids,
bool clearArray =
true);
653 int ProcessUserDefinedCuts(
double* bounds);
655 void SetCuts(
vtkBSPCuts* cuts,
int userDefined);
662 void UpdateBuildTime();
671 int DivideTest(
int numberOfPoints,
int level);
687 static void DeleteAllDescendants(
vtkKdNode* nd);
689 void BuildRegionList();
690 virtual int SelectCutDirection(
vtkKdNode* kd);
711 int GetNumberOfCells();
718 int GetDataSetsNumberOfCells(
int set1,
int set2);
738 float* ComputeCellCenters();
739 float* ComputeCellCenters(
int set);
749 void UpdateProgress(
double amount);
755 vtkSetClampMacro(Progress,
double, 0.0, 1.0);
756 vtkGetMacro(Progress,
double);
770 void UpdateSubOperationProgress(
double amount);
772 static void SetNewBounds_(
vtkKdNode* kd,
double* b,
int* fixDim);
775 static void SetDataBoundsToSpatialBounds(
vtkKdNode* kd);
776 static void ZeroNumberOfPoints(
vtkKdNode* kd);
779 void FindPointsWithinRadius(
vtkKdNode* node,
double R2,
const double x[3],
vtkIdList* ids);
790 int DivideRegion(
vtkKdNode* kd,
float* c1,
int* ids,
int nlevels);
792 void DoMedianFind(
vtkKdNode* kd,
float* c1,
int* ids,
int d1,
int d2,
int d3);
806 void InitializeCellLists();
809 void ComputeCellCenter(
vtkCell* cell,
double*
center,
double* weights);
812 void _generateRepresentationDataBounds(
816 void _generateRepresentationWholeSpace(
821 void printTree_(
int verbose);
823 int SearchNeighborsForDuplicate(
824 int regionId,
float*
point,
int** pointsSoFar,
int* len,
float tolerance,
float tolerance2);
826 int SearchRegionForDuplicate(
float*
point,
int* pointsSoFar,
int len,
float tolerance2);
828 int FindClosestPointInRegion_(
int regionId,
double x,
double y,
double z,
double& dist2);
830 int FindClosestPointInSphere(
831 double x,
double y,
double z,
double radius,
int skipRegion,
double& dist2);
833 int ViewOrderRegionsInDirection_(
839 int ViewOrderRegionsFromPosition_(
843 vtkIntArray* IdsOfInterest,
const double pos[3],
int nextId);
848 void SetInputDataInfo(
int i,
int dims[3],
double origin[3],
double spacing[3]);
849 int CheckInputDataInfo(
int i,
int dims[3],
double origin[3],
double spacing[3]);
850 void ClearLastBuildCache();
852 static void printTree_P(
vtkKdNode* kd,
int depth,
int verbose);
854 static int MidValue(
int dim,
float* c1,
int nvals,
double& coord);
856 static int Select(
int dim,
float* c1,
int* ids,
int nvals,
double& coord);
857 static float FindMaxLeftHalf(
int dim,
float* c1,
int K);
858 static void Select_(
int dim,
float* X,
int* ids,
int L,
int R,
int K);
861 static int SelfOrder(
int id,
vtkKdNode* kd);
862 static int findRegion(
vtkKdNode* node,
float x,
float y,
float z);
863 static int findRegion(
vtkKdNode* node,
double x,
double y,
double z);
867 static void AddNewRegions(
vtkKdNode* kd,
float* c1,
int midpt,
int dim,
double coord);
869 void NewPartitioningRequest(
int req);
875 double CellBoundsCache[6];
919 void operator=(
const vtkKdTree&) =
delete;
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