VTK  9.7.1
vtkHyperTreeGridNonOrientedUnlimitedGeometryCursor.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
32 #ifndef vtkHyperTreeGridNonOrientedUnlimitedGeometryCursor_h
33 #define vtkHyperTreeGridNonOrientedUnlimitedGeometryCursor_h
34 
35 #include "vtkCommonDataModelModule.h" // For export macro
36 #include "vtkObject.h"
37 
38 #include "vtkHyperTreeGridGeometryUnlimitedLevelEntry.h" // cache for historic
39 #include "vtkHyperTreeGridTools.h" // for HasTree
40 #include "vtkSmartPointer.h" // Used internally
41 #include <memory> // std::shared_ptr
42 #include <vector> // std::vector
43 
44 VTK_ABI_NAMESPACE_BEGIN
45 class vtkHyperTree;
46 class vtkHyperTreeGrid;
50 
52  : public vtkObject
53 {
54 public:
56  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
59  void Dump(ostream& os);
60 
66 
70  void Initialize(vtkHyperTreeGrid* grid, vtkIdType treeIndex, bool create = false);
71 
75  void Initialize(vtkHyperTreeGrid* grid, vtkHyperTree* tree, unsigned int level,
77 
78  void Initialize(vtkHyperTreeGrid* grid, vtkHyperTree* tree, unsigned int level, vtkIdType index,
79  double* origin);
80 
82 
84 
87  bool HasTree() const { return vtk::hypertreegrid::HasTree(*this); }
89 
91 
94  vtkHyperTree* GetTree() const { return this->Tree; }
96 
100  vtkIdType GetVertexId();
101 
106  vtkIdType GetGlobalNodeIndex();
107 
112  unsigned char GetDimension();
113 
118  unsigned char GetNumberOfChildren();
119 
120  void SetGlobalIndexStart(vtkIdType index);
121  void SetGlobalIndexFromLocal(vtkIdType index);
122 
123  double* GetOrigin();
124  double* GetSize();
125 
126  void GetBounds(double bounds[6]);
127  void GetPoint(double point[3]);
128 
133  void SetMask(bool state);
134 
138  bool IsMasked();
139 
144  bool IsLeaf();
145 
150  bool IsRealLeaf();
151 
156  bool IsVirtualLeaf();
157 
161  bool IsRoot();
162 
166  unsigned int GetLevel();
167  unsigned int GetLastRealLevel();
168 
176  void ToChild(unsigned char ichild);
177 
183  void ToRoot();
184 
190  void ToParent();
191 
196  vtkSmartPointer<vtkHyperTreeGridOrientedGeometryCursor> GetHyperTreeGridOrientedGeometryCursor(
197  vtkHyperTreeGrid* grid);
198 
204  GetHyperTreeGridNonOrientedGeometryCursor(vtkHyperTreeGrid* grid);
205 
206 protected:
212 
218 
223 
225 
229  std::shared_ptr<vtkHyperTreeGridScales> Scales;
230 
231  unsigned int Level;
232 
237 
238  // Hyper tree grid to which the cursor is attached
239  std::vector<vtkHyperTreeGridGeometryUnlimitedLevelEntry> Entries;
240 
241 private:
244  void operator=(const vtkHyperTreeGridNonOrientedUnlimitedGeometryCursor&) = delete;
245 };
246 VTK_ABI_NAMESPACE_END
247 #endif
void GetBounds(T a, double bds[6])
abstract base class for most VTK objects
Definition: vtkObject.h:52
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.
Hold a reference to a vtkObjectBase instance.
Definition: vtkMeta.h:23
int vtkIdType
Definition: vtkType.h:363
a simple class to control print indentation
Definition: vtkIndent.h:28
Cursor cache data with coordinates and level info.
vtkHyperTreeGrid * Grid
Reference sur l'hyper tree grid parcouru actuellement.
std::vector< vtkHyperTreeGridGeometryUnlimitedLevelEntry > Entries
void GetPoint(int i, int j, int k, double pnt[3])
A data object structured as a tree.
Definition: vtkHyperTree.h:170
vtkHyperTree * GetTree() const
Set the hyper tree to which the cursor is pointing.
Dynamic generation of scales for vtkHyperTree.
bool HasTree(const T &e)
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
std::shared_ptr< vtkHyperTreeGridScales > Scales
Storage of pre-computed per-level cell scales.