VTK  9.2.20230527
vtkIncrementalPointLocator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkIncrementalPointLocator.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
42 #ifndef vtkIncrementalPointLocator_h
43 #define vtkIncrementalPointLocator_h
44 
46 #include "vtkCommonDataModelModule.h" // For export macro
47 
48 VTK_ABI_NAMESPACE_BEGIN
49 class vtkPoints;
50 class vtkIdList;
51 
52 class VTKCOMMONDATAMODEL_EXPORT vtkIncrementalPointLocator : public vtkAbstractPointLocator
53 {
54 public:
56  void PrintSelf(ostream& os, vtkIndent indent) override;
57 
66  virtual vtkIdType FindClosestInsertedPoint(const double x[3]) = 0;
67 
68  // -------------------------------------------------------------------------
69  // ---------------------------- Point Location ----------------------------
70  // ---- All virtual functions related to point location are declared by ----
71  // --------------- the parent class vtkAbstractPointLocator ---------------
72  // -------------------------------------------------------------------------
73 
74  // -------------------------------------------------------------------------
75  // ---------------------------- Point Insertion ----------------------------
76  // -------------------------------------------------------------------------
77 
84  virtual int InitPointInsertion(vtkPoints* newPts, const double bounds[6]) = 0;
85 
92  virtual int InitPointInsertion(vtkPoints* newPts, const double bounds[6], vtkIdType estSize) = 0;
93 
99  virtual vtkIdType IsInsertedPoint(double x, double y, double z) = 0;
100 
106  virtual vtkIdType IsInsertedPoint(const double x[3]) = 0;
107 
115  virtual int InsertUniquePoint(const double x[3], vtkIdType& ptId) = 0;
116 
123  virtual void InsertPoint(vtkIdType ptId, const double x[3]) = 0;
124 
131  virtual vtkIdType InsertNextPoint(const double x[3]) = 0;
132 
133 protected:
136 
137 private:
139  void operator=(const vtkIncrementalPointLocator&) = delete;
140 };
141 
142 VTK_ABI_NAMESPACE_END
143 #endif
abstract class to quickly locate points in 3-space
list of point or cell ids
Definition: vtkIdList.h:144
Abstract class in support of both point location and point insertion.
virtual vtkIdType InsertNextPoint(const double x[3])=0
Insert a given point and return the point index.
virtual vtkIdType IsInsertedPoint(const double x[3])=0
Determine whether or not a given point has been inserted.
virtual int InitPointInsertion(vtkPoints *newPts, const double bounds[6], vtkIdType estSize)=0
Initialize the point insertion process.
virtual int InitPointInsertion(vtkPoints *newPts, const double bounds[6])=0
Initialize the point insertion process.
virtual void InsertPoint(vtkIdType ptId, const double x[3])=0
Insert a given point with a specified point index ptId.
virtual vtkIdType FindClosestInsertedPoint(const double x[3])=0
Given a point x assumed to be covered by the search structure, return the index of the closest point ...
void PrintSelf(ostream &os, vtkIndent indent) override
Standard type and print methods.
virtual vtkIdType IsInsertedPoint(double x, double y, double z)=0
Determine whether or not a given point has been inserted.
virtual int InsertUniquePoint(const double x[3], vtkIdType &ptId)=0
Insert a point unless there has been a duplicate in the search structure.
~vtkIncrementalPointLocator() override
a simple class to control print indentation
Definition: vtkIndent.h:120
represent and manipulate 3D points
Definition: vtkPoints.h:150
int vtkIdType
Definition: vtkType.h:327