VTK  9.3.1
vtkHyperTreeGridLocator.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
23 #ifndef vtkHyperTreeGridLocator_h
24 #define vtkHyperTreeGridLocator_h
25 
26 #include "vtkCommonDataModelModule.h" //For export macro
27 #include "vtkObject.h"
28 #include "vtkWeakPointer.h" //For HTG member
29 
30 VTK_ABI_NAMESPACE_BEGIN
31 
32 class vtkHyperTreeGrid;
33 class vtkPoints;
34 class vtkIdList;
35 class vtkGenericCell;
36 
37 class VTKCOMMONDATAMODEL_EXPORT vtkHyperTreeGridLocator : public vtkObject
38 {
39 public:
41 
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
47  virtual vtkHyperTreeGrid* GetHTG();
48  virtual void SetHTG(vtkHyperTreeGrid*);
49 
54  virtual void Initialize(){};
55 
60  virtual void Update();
61 
67  virtual vtkIdType Search(const double point[3]) = 0;
68 
79  virtual vtkIdType FindCell(const double point[3], double tol, vtkGenericCell* cell, int& subId,
80  double pcoords[3], double* weights) = 0;
81 
95  virtual int IntersectWithLine(const double p0[3], const double p1[3], double tol, double& t,
96  double x[3], double pcoords[3], int& subId, vtkIdType& cellId, vtkGenericCell* cell) = 0;
97 
108  virtual int IntersectWithLine(const double p0[3], const double p1[3], double tol,
109  vtkPoints* points, vtkIdList* cellIds, vtkGenericCell* cell) = 0;
110 
112 
116  vtkSetMacro(Tolerance, double);
117  vtkGetMacro(Tolerance, double);
119 
120 protected:
121  // Constructor/Destructor defaults
122  vtkHyperTreeGridLocator() = default;
123  ~vtkHyperTreeGridLocator() override = default;
124 
129 
130  double Tolerance = 0.0;
131 
132 private:
137  void operator=(const vtkHyperTreeGridLocator&) = delete;
138 
139 }; // vtkHyperTreeGridLocator
140 
141 VTK_ABI_NAMESPACE_END
142 #endif // vtkHyperTreeGridLocator_h
virtual void Initialize()
Initialize or reinitialize the locator (setting or re-setting clean objects in memory) (Does nothing)...
abstract base class for most VTK objects
Definition: vtkObject.h:51
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
int vtkIdType
Definition: vtkType.h:315
provides thread-safe access to cells
a simple class to control print indentation
Definition: vtkIndent.h:28
list of point or cell ids
Definition: vtkIdList.h:22
abstract base class for objects that implement accelerated searches through HyperTree Grids (HTGs) ...
vtkWeakPointer< vtkHyperTreeGrid > HTG
Internal reference to the HyperTreeGrid one wants to search over.
represent and manipulate 3D points
Definition: vtkPoints.h:28