VTK  9.0.1
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 =========================================================================*/
38 #ifndef vtkHyperTreeGridNonOrientedCursor_h
39 #define vtkHyperTreeGridNonOrientedCursor_h
40 
41 #include "vtkCommonDataModelModule.h" // For export macro
42 #include "vtkObject.h"
43 
44 #include <vector> // For std::vector
45 
46 class vtkHyperTree;
47 class vtkHyperTreeGrid;
49 
50 class VTKCOMMONDATAMODEL_EXPORT vtkHyperTreeGridNonOrientedCursor : public vtkObject
51 {
52 public:
54  void PrintSelf(ostream& os, vtkIndent indent) override;
56 
62 
66  void Initialize(vtkHyperTreeGrid* grid, vtkIdType treeIndex, bool create = false);
67 
71  void Initialize(
72  vtkHyperTreeGrid* grid, vtkHyperTree* tree, unsigned int level, vtkHyperTreeGridEntry& entry);
73 
77  void Initialize(vtkHyperTreeGrid* grid, vtkHyperTree* tree, unsigned int level, vtkIdType index);
78 
80 
85 
87 
90  bool HasTree() const;
92 
94 
99 
104 
110 
115  unsigned char GetDimension();
116 
121  unsigned char GetNumberOfChildren();
122 
127 
132 
137  void SetMask(bool state);
138 
142  bool IsMasked();
143 
147  bool IsLeaf();
148 
153 
157  bool IsRoot();
158 
162  unsigned int GetLevel();
163 
171  void ToChild(unsigned char ichild);
172 
178  void ToRoot();
179 
185  void ToParent();
186 
187 protected:
192 
197 
202 
207 
211  unsigned int Level;
212 
217 
221  std::vector<vtkHyperTreeGridEntry> Entries;
222 
223 private:
225  void operator=(const vtkHyperTreeGridNonOrientedCursor&) = delete;
226 };
227 #endif
vtkHyperTreeGridNonOrientedCursor::GetLevel
unsigned int GetLevel()
Get the level of the tree vertex pointed by the cursor.
vtkHyperTreeGridNonOrientedCursor::vtkHyperTreeGridNonOrientedCursor
vtkHyperTreeGridNonOrientedCursor()
Constructor.
vtkHyperTreeGridNonOrientedCursor::Grid
vtkHyperTreeGrid * Grid
JB Reference sur l'hyper tree grid parcouru actuellement.
Definition: vtkHyperTreeGridNonOrientedCursor.h:201
vtkHyperTreeGridNonOrientedCursor::Initialize
void Initialize(vtkHyperTreeGrid *grid, vtkHyperTree *tree, unsigned int level, vtkIdType index)
Initialize cursor at root of given tree index in grid.
vtkHyperTreeGridNonOrientedCursor::GetTree
vtkHyperTree * GetTree() const
Set the hyper tree to which the cursor is pointing.
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkHyperTreeGridNonOrientedCursor::SubdivideLeaf
void SubdivideLeaf()
JB.
vtkHyperTreeGridNonOrientedCursor::IsLeaf
bool IsLeaf()
Is the cursor pointing to a leaf?
vtkHyperTreeGridNonOrientedCursor::GetGlobalNodeIndex
vtkIdType GetGlobalNodeIndex()
Return the global index (relative to the grid) of the current vertex in the tree.
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:54
vtkHyperTreeGridNonOrientedCursor::Clone
vtkHyperTreeGridNonOrientedCursor * Clone()
Create a copy of ‘this’.
vtkHyperTreeGridNonOrientedCursor
Objects for traversal a HyperTreeGrid.
Definition: vtkHyperTreeGridNonOrientedCursor.h:51
vtkHyperTreeGridNonOrientedCursor::SetGlobalIndexStart
void SetGlobalIndexStart(vtkIdType index)
JB.
vtkHyperTreeGridNonOrientedCursor::ToRoot
void ToRoot()
Move the cursor to the root vertex.
vtkHyperTreeGridNonOrientedCursor::Tree
vtkHyperTree * Tree
JB.
Definition: vtkHyperTreeGridNonOrientedCursor.h:206
vtkHyperTreeGridNonOrientedCursor::IsRoot
bool IsRoot()
Is the cursor at tree root?
vtkX3D::level
@ level
Definition: vtkX3D.h:401
vtkHyperTreeGridNonOrientedCursor::Entries
std::vector< vtkHyperTreeGridEntry > Entries
JB Hyper tree grid to which the cursor is attached.
Definition: vtkHyperTreeGridNonOrientedCursor.h:221
vtkHyperTreeGridNonOrientedCursor::GetDimension
unsigned char GetDimension()
Return the dimension of the tree.
vtkHyperTreeGridNonOrientedCursor::Initialize
void Initialize(vtkHyperTreeGrid *grid, vtkIdType treeIndex, bool create=false)
Initialize cursor at root of given tree index in grid.
vtkHyperTreeGridNonOrientedCursor::Level
unsigned int Level
JB .
Definition: vtkHyperTreeGridNonOrientedCursor.h:211
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkHyperTree
A data object structured as a tree.
Definition: vtkHyperTree.h:179
vtkHyperTreeGridNonOrientedCursor::ToParent
void ToParent()
Move the cursor to the parent of the current vertex.
vtkObject.h
vtkHyperTreeGridEntry
Entries are cache data for cursors.
Definition: vtkHyperTreeGridEntry.h:75
vtkHyperTreeGridNonOrientedCursor::GetVertexId
vtkIdType GetVertexId()
Return the index of the current vertex in the tree.
vtkHyperTreeGridNonOrientedCursor::GetNumberOfChildren
unsigned char GetNumberOfChildren()
Return the number of children for each node (non-vertex leaf) of the tree.
vtkHyperTreeGridNonOrientedCursor::New
static vtkHyperTreeGridNonOrientedCursor * New()
vtkHyperTreeGridNonOrientedCursor::ToChild
void ToChild(unsigned char ichild)
Move the cursor to child ‘child’ of the current vertex.
vtkHyperTreeGridNonOrientedCursor::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkHyperTreeGridNonOrientedCursor::LastValidEntry
int LastValidEntry
JB Le dernier noeud valid enregistre.
Definition: vtkHyperTreeGridNonOrientedCursor.h:216
vtkHyperTreeGridNonOrientedCursor::GetGrid
vtkHyperTreeGrid * GetGrid()
Set the hyper tree grid to which the cursor is pointing.
vtkHyperTreeGridNonOrientedCursor::SetMask
void SetMask(bool state)
Set the blanking mask is empty or not.
vtkX3D::index
@ index
Definition: vtkX3D.h:252
vtkHyperTreeGridNonOrientedCursor::Initialize
void Initialize(vtkHyperTreeGrid *grid, vtkHyperTree *tree, unsigned int level, vtkHyperTreeGridEntry &entry)
Initialize cursor at root of given tree index in grid.
vtkHyperTreeGridNonOrientedCursor::SetGlobalIndexFromLocal
void SetGlobalIndexFromLocal(vtkIdType index)
JB.
vtkHyperTreeGridNonOrientedCursor::HasTree
bool HasTree() const
Return if a Tree pointing exist.
vtkHyperTreeGridNonOrientedCursor::IsMasked
bool IsMasked()
Determine whether blanking mask is empty or not.
vtkHyperTreeGrid
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
Definition: vtkHyperTreeGrid.h:97
vtkHyperTreeGridNonOrientedCursor::~vtkHyperTreeGridNonOrientedCursor
~vtkHyperTreeGridNonOrientedCursor() override
Destructor.