50 #ifndef __vtkIncrementalOctreePointLocator_h
51 #define __vtkIncrementalOctreePointLocator_h
53 #include "vtkCommonDataModelModule.h"
54 #include "vtkIncrementalPointLocator.h"
60 class vtkIncrementalOctreeNode;
67 void PrintSelf( ostream & os,
vtkIndent indent );
80 vtkSetClampMacro( MaxPointsPerLeaf,
int, 16, 256 );
81 vtkGetMacro( MaxPointsPerLeaf,
int );
86 vtkSetMacro( BuildCubicOctree,
int );
87 vtkGetMacro( BuildCubicOctree,
int );
88 vtkBooleanMacro( BuildCubicOctree,
int );
94 vtkGetObjectMacro( LocatorPoints,
vtkPoints );
98 virtual void Initialize() { this->FreeSearchStructure(); }
101 virtual void FreeSearchStructure();
104 virtual void GetBounds(
double * bounds );
109 { this->GetBounds( this->Bounds );
return this->Bounds; }
113 int GetNumberOfPoints();
121 virtual vtkIdType FindClosestInsertedPoint(
const double x[3] );
125 virtual void GenerateRepresentation(
int nodeLevel,
vtkPolyData * polysData );
134 virtual void BuildLocator();
140 virtual vtkIdType FindClosestPoint(
const double x[3] );
146 virtual vtkIdType FindClosestPoint(
double x,
double y,
double z );
153 virtual vtkIdType FindClosestPoint(
const double x[3],
double * miniDist2 );
160 virtual vtkIdType FindClosestPoint(
double x,
double y,
double z,
double * miniDist2 );
169 virtual vtkIdType FindClosestPointWithinRadius
170 (
double radius,
const double x[3],
double & dist2 );
180 vtkIdType FindClosestPointWithinSquaredRadius
181 (
double radius2,
const double x[3],
double & dist2 );
190 virtual void FindPointsWithinRadius
191 (
double R,
const double x[3],
vtkIdList * result );
200 void FindPointsWithinSquaredRadius
201 (
double R2,
const double x[3],
vtkIdList * result );
210 virtual void FindClosestNPoints
211 (
int N,
const double x[3],
vtkIdList * result );
225 virtual int InitPointInsertion(
vtkPoints * points,
const double bounds[6] );
236 virtual int InitPointInsertion(
vtkPoints * points,
const double bounds[6],
244 virtual vtkIdType IsInsertedPoint(
const double x[3] );
250 virtual vtkIdType IsInsertedPoint(
double x,
double y,
double z );
259 virtual int InsertUniquePoint(
const double point[3],
vtkIdType & pntId );
268 virtual void InsertPoint(
vtkIdType ptId,
const double x[3] );
277 virtual vtkIdType InsertNextPoint(
const double x[3] );
287 void InsertPointWithoutChecking
288 (
const double point[3],
vtkIdType & pntId,
int insert );
299 int BuildCubicOctree;
300 int MaxPointsPerLeaf;
301 double InsertTolerance2;
302 double OctreeMaxDimSize;
305 vtkIncrementalOctreeNode * OctreeRootNode;
308 static void DeleteAllDescendants( vtkIncrementalOctreeNode * node );
313 static void AddPolys( vtkIncrementalOctreeNode * node,
314 vtkPoints * points, vtkCellArray * polygs );
321 vtkIncrementalOctreeNode * GetLeafContainer( vtkIncrementalOctreeNode * node,
322 const double pnt[3] );
332 vtkIdType FindClosestPointInLeafNode( vtkIncrementalOctreeNode * leafNode,
333 const double point[3],
double * dist2 );
349 (
const double point[3],
double radius2, vtkIncrementalOctreeNode * maskNode,
350 double * minDist2,
const double * refDist2 );
368 vtkIdType FindClosestPointInSphereWithoutTolerance(
const double point[3],
369 double radius2, vtkIncrementalOctreeNode * maskNode,
double * minDist2 );
377 void FindPointsWithinSquaredRadius( vtkIncrementalOctreeNode * node,
378 double radius2,
const double point[3],
vtkIdList * idList );
396 vtkIdType FindClosestPointInSphereWithTolerance(
const double point[3],
397 double radius2, vtkIncrementalOctreeNode * maskNode,
double * minDist2 );
409 vtkIdType IsInsertedPoint(
const double x[3],
410 vtkIncrementalOctreeNode ** leafContainer );
421 vtkIdType IsInsertedPointForZeroTolerance
422 (
const double x[3], vtkIncrementalOctreeNode ** leafContainer );
434 vtkIdType IsInsertedPointForNonZeroTolerance
435 (
const double x[3], vtkIncrementalOctreeNode ** leafContainer );
444 vtkIdType FindDuplicatePointInLeafNode( vtkIncrementalOctreeNode * leafNode,
445 const double point[3] );
455 vtkIdType FindDuplicateFloatTypePointInVisitedLeafNode
456 ( vtkIncrementalOctreeNode * leafNode,
const double point[3] );
466 vtkIdType FindDuplicateDoubleTypePointInVisitedLeafNode
467 ( vtkIncrementalOctreeNode * leafNode,
const double point[3] );
virtual void Initialize()
concrete dataset represents vertices, lines, polygons, and triangle strips
a simple class to control print indentation
list of point or cell ids
virtual double * GetBounds()
represent and manipulate 3D points
Incremental octree in support of both point location and point insertion.