VTK  9.3.0
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
40VTK_ABI_NAMESPACE_BEGIN
41class vtkHyperTree;
44
45class VTKCOMMONDATAMODEL_EXPORT vtkHyperTreeGridNonOrientedCursor : public vtkObject
46{
47public:
49 void PrintSelf(ostream& os, vtkIndent indent) override;
51
57
61 void Initialize(vtkHyperTreeGrid* grid, vtkIdType treeIndex, bool create = false);
62
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
80
82
85 bool HasTree() const;
87
89
94
99
105
110 unsigned char GetDimension();
111
116 unsigned char GetNumberOfChildren();
117
122
127
132 void SetMask(bool state);
133
137 bool IsMasked();
138
142 bool IsLeaf();
143
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
182protected:
187
192
197
202
206 unsigned int Level;
207
212
216 std::vector<vtkHyperTreeGridEntry> Entries;
217
218private:
220 void operator=(const vtkHyperTreeGridNonOrientedCursor&) = delete;
221};
222VTK_ABI_NAMESPACE_END
223#endif
Entries are cache data for cursors.
Objects for traversal a HyperTreeGrid.
void Initialize(vtkHyperTreeGrid *grid, vtkHyperTree *tree, unsigned int level, vtkIdType index)
Initialize cursor at root of given tree index in grid.
vtkHyperTreeGrid * GetGrid()
Set the hyper tree grid to which the cursor is pointing.
static vtkHyperTreeGridNonOrientedCursor * New()
~vtkHyperTreeGridNonOrientedCursor() override
Destructor.
void ToChild(unsigned char ichild)
Move the cursor to child ‘child’ of the current vertex.
vtkHyperTreeGrid * Grid
JB Reference sur l'hyper tree grid parcouru actuellement.
int LastValidEntry
JB Le dernier noeud valid enregistre.
void SetMask(bool state)
Set the blanking mask is empty or not.
bool IsRoot()
Is the cursor at tree root?
unsigned int GetLevel()
Get the level of the tree vertex pointed by the cursor.
void ToRoot()
Move the cursor to the root vertex.
unsigned char GetNumberOfChildren()
Return the number of children for each node (non-vertex leaf) of the tree.
void Initialize(vtkHyperTreeGrid *grid, vtkHyperTree *tree, unsigned int level, vtkHyperTreeGridEntry &entry)
Initialize cursor at root of given tree index in grid.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
unsigned char GetDimension()
Return the dimension of the tree.
bool HasTree() const
Return if a Tree pointing exist.
bool IsMasked()
Determine whether blanking mask is empty or not.
void SetGlobalIndexStart(vtkIdType index)
JB.
vtkHyperTreeGridNonOrientedCursor()
Constructor.
vtkIdType GetVertexId()
Return the index of the current vertex in the tree.
bool IsLeaf()
Is the cursor pointing to a leaf?
vtkIdType GetGlobalNodeIndex()
Return the global index (relative to the grid) of the current vertex in the tree.
void SetGlobalIndexFromLocal(vtkIdType index)
JB.
void Initialize(vtkHyperTreeGrid *grid, vtkIdType treeIndex, bool create=false)
Initialize cursor at root of given tree index in grid.
vtkHyperTreeGridNonOrientedCursor * Clone()
Create a copy of ‘this’.
std::vector< vtkHyperTreeGridEntry > Entries
JB Hyper tree grid to which the cursor is attached.
vtkHyperTree * GetTree() const
Set the hyper tree to which the cursor is pointing.
void ToParent()
Move the cursor to the parent of the current vertex.
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
A data object structured as a tree.
a simple class to control print indentation
Definition vtkIndent.h:29
abstract base class for most VTK objects
Definition vtkObject.h:49
int vtkIdType
Definition vtkType.h:315