VTK  9.3.20240423
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
30VTK_ABI_NAMESPACE_BEGIN
31
33class vtkPoints;
34class vtkIdList;
35class vtkGenericCell;
36
37class VTKCOMMONDATAMODEL_EXPORT vtkHyperTreeGridLocator : public vtkObject
38{
39public:
41
42 void PrintSelf(ostream& os, vtkIndent indent) override;
43
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
120protected:
121 // Constructor/Destructor defaults
123 ~vtkHyperTreeGridLocator() override = default;
124
129
130 double Tolerance = 0.0;
131
132private:
137 void operator=(const vtkHyperTreeGridLocator&) = delete;
138
139}; // vtkHyperTreeGridLocator
140
141VTK_ABI_NAMESPACE_END
142#endif // vtkHyperTreeGridLocator_h
provides thread-safe access to cells
abstract base class for objects that implement accelerated searches through HyperTree Grids (HTGs)
virtual void SetHTG(vtkHyperTreeGrid *)
virtual vtkHyperTreeGrid * GetHTG()
Getter/Setter methods for setting the vtkHyperTreeGrid.
~vtkHyperTreeGridLocator() override=default
vtkWeakPointer< vtkHyperTreeGrid > HTG
Internal reference to the HyperTreeGrid one wants to search over.
virtual int IntersectWithLine(const double p0[3], const double p1[3], double tol, double &t, double x[3], double pcoords[3], int &subId, vtkIdType &cellId, vtkGenericCell *cell)=0
Pure virtual.
virtual void Update()
Update the locator's internal variables with respect to changes that could have happened outside.
virtual vtkIdType FindCell(const double point[3], double tol, vtkGenericCell *cell, int &subId, double pcoords[3], double *weights)=0
Pure virtual.
virtual vtkIdType Search(const double point[3])=0
Basic search for cell holding a given point.
vtkHyperTreeGridLocator()=default
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void Initialize()
Initialize or reinitialize the locator (setting or re-setting clean objects in memory) (Does nothing)
virtual int IntersectWithLine(const double p0[3], const double p1[3], double tol, vtkPoints *points, vtkIdList *cellIds, vtkGenericCell *cell)=0
Pure virtual.
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
list of point or cell ids
Definition vtkIdList.h:133
a simple class to control print indentation
Definition vtkIndent.h:108
abstract base class for most VTK objects
Definition vtkObject.h:162
represent and manipulate 3D points
Definition vtkPoints.h:139
a weak reference to a vtkObject.
int vtkIdType
Definition vtkType.h:315