 |
VTK
9.1.0
|
Go to the documentation of this file.
126 #ifndef vtkOctreePointLocator_h
127 #define vtkOctreePointLocator_h
130 #include "vtkCommonDataModelModule.h"
150 vtkSetMacro(MaximumPointsPerRegion,
int);
151 vtkGetMacro(MaximumPointsPerRegion,
int);
158 vtkSetMacro(CreateCubicOctants,
int);
159 vtkGetMacro(CreateCubicOctants,
int);
169 vtkGetMacro(FudgeFactor,
double);
170 vtkSetMacro(FudgeFactor,
double);
186 vtkGetMacro(NumberOfLeafNodes,
int);
336 double x,
double y,
double z,
double radius,
int skipRegion,
double& dist2);
represent and manipulate 3D points
an octree spatial decomposition of a set of points
void BuildLocator() override
Create the octree decomposition of the cells of the data set or data sets.
int FindClosestPointInSphere(double x, double y, double z, double radius, int skipRegion, double &dist2)
Given a location and a radiues, find the closest point within this radius.
vtkIdType FindClosestPoint(double x, double y, double z, double &dist2)
Return the Id of the point that is closest to the given point.
void operator=(const vtkOctreePointLocator &)=delete
~vtkOctreePointLocator() override
void FindPointsInArea(double *area, vtkIdTypeArray *ids, bool clearArray=true)
Fill ids with points found in area.
void GenerateRepresentation(int level, vtkPolyData *pd) override
Create a polydata representation of the boundaries of the octree regions.
void FreeSearchStructure() override
Delete the octree data structure.
void AddAllPointsInRegion(vtkOctreePointLocatorNode *node, vtkIdList *ids)
void GetRegionDataBounds(int leafNodeID, double bounds[6])
Get the bounds of the data within the leaf node.
void FindClosestNPoints(int N, const double x[3], vtkIdList *result) override
Find the closest N points to a position.
int _FindClosestPointInRegion(int leafNodeId, double x, double y, double z, double &dist2)
Given a leaf node id and point, return the local id and the squared distance between the closest poin...
int NumberOfLocatorPoints
void FindPointsInArea(vtkOctreePointLocatorNode *node, double *area, vtkIdTypeArray *ids)
int NumberOfLeafNodes
The maximum number of points in a region/octant before it is subdivided.
Octree node that has 8 children each of equal size.
vtkOctreePointLocator(const vtkOctreePointLocator &)=delete
int DivideTest(int size, int level)
vtkOctreePointLocatorNode ** LeafNodeList
void FindPointsWithinRadius(vtkOctreePointLocatorNode *node, double radiusSquared, const double x[3], vtkIdList *ids)
Recursive helper for public FindPointsWithinRadius.
static vtkOctreePointLocator * New()
vtkOctreePointLocatorNode * Top
int CreateCubicOctants
If CreateCubicOctants is non-zero, the bounding box of the points will be expanded such that all octa...
void DivideRegion(vtkOctreePointLocatorNode *node, int *ordering, int level)
static void SetDataBoundsToSpatialBounds(vtkOctreePointLocatorNode *node)
vtkIdType FindClosestPointInRegion(int regionId, double x, double y, double z, double &dist2)
Find the Id of the point in the given leaf region which is closest to the given point.
vtkIdType FindClosestPointWithinRadius(double radius, const double x[3], double &dist2) override
Given a position x and a radius r, return the id of the point closest to the point in that radius.
void AddAllPointsInRegion(vtkOctreePointLocatorNode *node, vtkIdTypeArray *ids)
void GetRegionBounds(int regionID, double bounds[6])
Get the spatial bounds of octree region.
a simple class to control print indentation
object to represent cell connectivity
list of point or cell ids
static void DeleteAllDescendants(vtkOctreePointLocatorNode *octant)
void GetBounds(double *bounds) override
Get the spatial bounds of the entire octree space.
void AddPolys(vtkOctreePointLocatorNode *node, vtkPoints *pts, vtkCellArray *polys)
int GetRegionContainingPoint(double x, double y, double z)
Get the id of the leaf region containing the specified location.
vtkIdTypeArray * GetPointsInRegion(int leafNodeId)
Get a list of the original IDs of all points in a leaf node.
dynamic, self-adjusting array of vtkIdType
vtkIdType FindClosestPointInRegion(int regionId, double *x, double &dist2)
Find the Id of the point in the given leaf region which is closest to the given point.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard type and print methods.
concrete dataset represents vertices, lines, polygons, and triangle strips
int FindRegion(vtkOctreePointLocatorNode *node, float x, float y, float z)
Given a point and a node return the leaf node id that contains the point.
abstract class to quickly locate points in 3-space
void BuildLeafNodeList(vtkOctreePointLocatorNode *node, int &index)
vtkIdType FindClosestPoint(const double x[3]) override
Return the Id of the point that is closest to the given point.
int FindRegion(vtkOctreePointLocatorNode *node, double x, double y, double z)
Given a point and a node return the leaf node id that contains the point.
void FindPointsWithinRadius(double radius, const double x[3], vtkIdList *result) override
Find all points within a specified radius of position x.
int MaximumPointsPerRegion
The maximum number of points in a region/octant before it is subdivided.
double * GetBounds() override
Get the spatial bounds of the entire octree space.