VTK  9.3.1
vtkHyperTreeGridOrientedCursor.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
29 #ifndef vtkHyperTreeGridOrientedCursor_h
30 #define vtkHyperTreeGridOrientedCursor_h
31 
32 #include "vtkCommonDataModelModule.h" // For export macro
33 #include "vtkHyperTreeGridEntry.h" // Used internally
34 #include "vtkObject.h"
35 
36 VTK_ABI_NAMESPACE_BEGIN
37 class vtkHyperTree;
38 class vtkHyperTreeGrid;
39 
40 class VTKCOMMONDATAMODEL_EXPORT vtkHyperTreeGridOrientedCursor : public vtkObject
41 {
42 public:
44  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
52 
56  void Initialize(vtkHyperTreeGrid* grid, vtkIdType treeIndex, bool create = false);
57 
61  void Initialize(vtkHyperTreeGrid* grid, vtkHyperTree* tree, unsigned int level, vtkIdType index);
62 
66  void Initialize(
67  vtkHyperTreeGrid* grid, vtkHyperTree* tree, unsigned int level, vtkHyperTreeGridEntry& entry);
68 
70 
73  vtkHyperTreeGrid* GetGrid();
75 
77 
80  bool HasTree() const;
82 
84 
87  vtkHyperTree* GetTree() const;
89 
93  vtkIdType GetVertexId();
94 
99  vtkIdType GetGlobalNodeIndex();
100 
105  unsigned char GetDimension();
106 
111  unsigned char GetNumberOfChildren();
112 
116  void SetGlobalIndexStart(vtkIdType index);
117 
121  void SetGlobalIndexFromLocal(vtkIdType index);
122 
127  void SetMask(bool state);
128 
132  bool IsMasked();
133 
137  bool IsLeaf();
138 
142  void SubdivideLeaf();
143 
147  bool IsRoot();
148 
152  unsigned int GetLevel();
153 
161  void ToChild(unsigned char ichild);
162 
163 protected:
168 
172  ~vtkHyperTreeGridOrientedCursor() override;
173 
178 
183 
187  unsigned int Level;
188 
189  // Hyper tree grid to which the cursor is attached
191 
192 private:
194  void operator=(const vtkHyperTreeGridOrientedCursor&) = delete;
195 };
196 VTK_ABI_NAMESPACE_END
197 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:51
vtkHyperTreeGrid * Grid
JB Reference sur l'hyper tree grid parcouru actuellement.
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
a simple class to control print indentation
Definition: vtkIndent.h:28
Entries are cache data for cursors.
Objects for traversal a HyperTreeGrid.
A data object structured as a tree.
Definition: vtkHyperTree.h:168
bool HasTree(const T &e)
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...