VTK  9.3.1
vtkHyperTreeGridNonOrientedCursor.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 vtkHyperTreeGridNonOrientedCursor_h
33 #define vtkHyperTreeGridNonOrientedCursor_h
34 
35 #include "vtkCommonDataModelModule.h" // For export macro
36 #include "vtkObject.h"
37 
38 #include <vector> // For std::vector
39 
40 VTK_ABI_NAMESPACE_BEGIN
41 class vtkHyperTree;
42 class vtkHyperTreeGrid;
44 
45 class VTKCOMMONDATAMODEL_EXPORT vtkHyperTreeGridNonOrientedCursor : public vtkObject
46 {
47 public:
49  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
57 
61  void Initialize(vtkHyperTreeGrid* grid, vtkIdType treeIndex, bool create = false);
62 
66  void Initialize(
67  vtkHyperTreeGrid* grid, vtkHyperTree* tree, unsigned int level, vtkHyperTreeGridEntry& entry);
68 
72  void Initialize(vtkHyperTreeGrid* grid, vtkHyperTree* tree, unsigned int level, vtkIdType index);
73 
75 
78  vtkHyperTreeGrid* GetGrid();
80 
82 
85  bool HasTree() const;
87 
89 
92  vtkHyperTree* GetTree() const;
94 
98  vtkIdType GetVertexId();
99 
104  vtkIdType GetGlobalNodeIndex();
105 
110  unsigned char GetDimension();
111 
116  unsigned char GetNumberOfChildren();
117 
121  void SetGlobalIndexStart(vtkIdType index);
122 
126  void SetGlobalIndexFromLocal(vtkIdType index);
127 
132  void SetMask(bool state);
133 
137  bool IsMasked();
138 
142  bool IsLeaf();
143 
147  void SubdivideLeaf();
148 
152  bool IsRoot();
153 
157  unsigned int GetLevel();
158 
166  void ToChild(unsigned char ichild);
167 
173  void ToRoot();
174 
180  void ToParent();
181 
182 protected:
187 
192 
197 
202 
206  unsigned int Level;
207 
212 
216  std::vector<vtkHyperTreeGridEntry> Entries;
217 
218 private:
220  void operator=(const vtkHyperTreeGridNonOrientedCursor&) = delete;
221 };
222 VTK_ABI_NAMESPACE_END
223 #endif
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.
vtkHyperTreeGrid * Grid
JB Reference sur l'hyper tree grid parcouru actuellement.
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
int vtkIdType
Definition: vtkType.h:315
Objects for traversal a HyperTreeGrid.
a simple class to control print indentation
Definition: vtkIndent.h:28
Entries are cache data for cursors.
A data object structured as a tree.
Definition: vtkHyperTree.h:168
int LastValidEntry
JB Le dernier noeud valid enregistre.
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::vector< vtkHyperTreeGridEntry > Entries
JB Hyper tree grid to which the cursor is attached.