VTK: Common/DataModel/vtkHyperTreeGridLocator.h Source File

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