VTK  9.2.6
vtkHyperTreeGridNonOrientedCursor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkHyperTreeGridNonOrientedCursor.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright Nonice for more information.
13 
14 =========================================================================*/
41 #ifndef vtkHyperTreeGridNonOrientedCursor_h
42 #define vtkHyperTreeGridNonOrientedCursor_h
43 
44 #include "vtkCommonDataModelModule.h" // For export macro
45 #include "vtkObject.h"
46 
47 #include <vector> // For std::vector
48 
49 class vtkHyperTree;
50 class vtkHyperTreeGrid;
52 
53 class VTKCOMMONDATAMODEL_EXPORT vtkHyperTreeGridNonOrientedCursor : public vtkObject
54 {
55 public:
57  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
65 
69  void Initialize(vtkHyperTreeGrid* grid, vtkIdType treeIndex, bool create = false);
70 
74  void Initialize(
75  vtkHyperTreeGrid* grid, vtkHyperTree* tree, unsigned int level, vtkHyperTreeGridEntry& entry);
76 
80  void Initialize(vtkHyperTreeGrid* grid, vtkHyperTree* tree, unsigned int level, vtkIdType index);
81 
83 
88 
90 
93  bool HasTree() const;
95 
97 
102 
107 
113 
118  unsigned char GetDimension();
119 
124  unsigned char GetNumberOfChildren();
125 
130 
135 
140  void SetMask(bool state);
141 
145  bool IsMasked();
146 
150  bool IsLeaf();
151 
156 
160  bool IsRoot();
161 
165  unsigned int GetLevel();
166 
174  void ToChild(unsigned char ichild);
175 
181  void ToRoot();
182 
188  void ToParent();
189 
190 protected:
195 
200 
205 
210 
214  unsigned int Level;
215 
220 
224  std::vector<vtkHyperTreeGridEntry> Entries;
225 
226 private:
228  void operator=(const vtkHyperTreeGridNonOrientedCursor&) = delete;
229 };
230 #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.
~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.
vtkHyperTreeGrid * GetGrid()
Set the hyper tree grid to which the cursor is pointing.
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.
static vtkHyperTreeGridNonOrientedCursor * New()
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 * Clone()
Create a copy of ‘this’.
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.
vtkHyperTree * GetTree() const
Set the hyper tree to which the cursor is pointing.
void Initialize(vtkHyperTreeGrid *grid, vtkIdType treeIndex, bool create=false)
Initialize cursor at root of given tree index in grid.
std::vector< vtkHyperTreeGridEntry > Entries
JB Hyper tree grid to which the cursor is attached.
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.
Definition: vtkHyperTree.h:180
a simple class to control print indentation
Definition: vtkIndent.h:119
abstract base class for most VTK objects
Definition: vtkObject.h:82
@ level
Definition: vtkX3D.h:401
@ index
Definition: vtkX3D.h:252
int vtkIdType
Definition: vtkType.h:332