VTK  9.3.20240418
vtkIncrementalPointLocator.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
30 #ifndef vtkIncrementalPointLocator_h
31 #define vtkIncrementalPointLocator_h
32 
34 #include "vtkCommonDataModelModule.h" // For export macro
35 
36 VTK_ABI_NAMESPACE_BEGIN
37 class vtkPoints;
38 class vtkIdList;
39 
40 class VTKCOMMONDATAMODEL_EXPORT vtkIncrementalPointLocator : public vtkAbstractPointLocator
41 {
42 public:
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
54  virtual vtkIdType FindClosestInsertedPoint(const double x[3]) = 0;
55 
56  // -------------------------------------------------------------------------
57  // ---------------------------- Point Location ----------------------------
58  // ---- All virtual functions related to point location are declared by ----
59  // --------------- the parent class vtkAbstractPointLocator ---------------
60  // -------------------------------------------------------------------------
61 
62  // -------------------------------------------------------------------------
63  // ---------------------------- Point Insertion ----------------------------
64  // -------------------------------------------------------------------------
65 
72  virtual int InitPointInsertion(vtkPoints* newPts, const double bounds[6]) = 0;
73 
80  virtual int InitPointInsertion(vtkPoints* newPts, const double bounds[6], vtkIdType estSize) = 0;
81 
87  virtual vtkIdType IsInsertedPoint(double x, double y, double z) = 0;
88 
94  virtual vtkIdType IsInsertedPoint(const double x[3]) = 0;
95 
103  virtual int InsertUniquePoint(const double x[3], vtkIdType& ptId) = 0;
104 
111  virtual void InsertPoint(vtkIdType ptId, const double x[3]) = 0;
112 
119  virtual vtkIdType InsertNextPoint(const double x[3]) = 0;
120 
121 protected:
124 
125 private:
127  void operator=(const vtkIncrementalPointLocator&) = delete;
128 };
129 
130 VTK_ABI_NAMESPACE_END
131 #endif
abstract class to quickly locate points in 3-space
list of point or cell ids
Definition: vtkIdList.h:133
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:108
represent and manipulate 3D points
Definition: vtkPoints.h:139
int vtkIdType
Definition: vtkType.h:315