VTK: Common/DataModel/vtkHyperTreeGridOrientedCursor.h Source File

| 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:
43 vtkTypeMacro(vtkHyperTreeGridOrientedCursor, vtkObject);
44 void PrintSelf(ostream& os, vtkIndent indent) override;
45 static vtkHyperTreeGridOrientedCursor* New();
46
51 vtkHyperTreeGridOrientedCursor* Clone();
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:
167 vtkHyperTreeGridOrientedCursor();
168
172 ~vtkHyperTreeGridOrientedCursor() override;
173
177 vtkHyperTreeGrid* Grid;
178
182 vtkHyperTree* Tree;
183
187 unsigned int Level;
188
189 // Hyper tree grid to which the cursor is attached
190 vtkHyperTreeGridEntry Entry;
191
192 private:
193 vtkHyperTreeGridOrientedCursor(const vtkHyperTreeGridOrientedCursor&) = delete;
194 void operator=(const vtkHyperTreeGridOrientedCursor&) = delete;
195 };
196 VTK_ABI_NAMESPACE_END
197 #endif
vtkHyperTreeGridEntry
Entries are cache data for cursors.
Definition: vtkHyperTreeGridEntry.h:62
vtkHyperTreeGridOrientedCursor
Objects for traversal a HyperTreeGrid.
Definition: vtkHyperTreeGridOrientedCursor.h:41
vtkHyperTreeGridOrientedCursor::Entry
vtkHyperTreeGridEntry Entry
Definition: vtkHyperTreeGridOrientedCursor.h:190
vtkHyperTreeGridOrientedCursor::vtkHyperTreeGridOrientedCursor
vtkHyperTreeGridOrientedCursor()
Constructor.
vtkHyperTreeGridOrientedCursor::SetGlobalIndexStart
void SetGlobalIndexStart(vtkIdType index)
JB.
vtkHyperTreeGridOrientedCursor::GetTree
vtkHyperTree * GetTree() const
Set the hyper tree to which the cursor is pointing.
vtkHyperTreeGridOrientedCursor::IsMasked
bool IsMasked()
Determine whether blanking mask is empty or not.
vtkHyperTreeGridOrientedCursor::GetLevel
unsigned int GetLevel()
Get the level of the tree vertex pointed by the cursor.
vtkHyperTreeGridOrientedCursor::IsRoot
bool IsRoot()
Is the cursor at tree root?
vtkHyperTreeGridOrientedCursor::GetGrid
vtkHyperTreeGrid * GetGrid()
Set the hyper tree grid to which the cursor is pointing.
vtkHyperTreeGridOrientedCursor::Level
unsigned int Level
JB.
Definition: vtkHyperTreeGridOrientedCursor.h:187
vtkHyperTreeGridOrientedCursor::Initialize
void Initialize(vtkHyperTreeGrid *grid, vtkHyperTree *tree, unsigned int level, vtkIdType index)
JB.
vtkHyperTreeGridOrientedCursor::Clone
vtkHyperTreeGridOrientedCursor * Clone()
Create a copy of ‘this’.
vtkHyperTreeGridOrientedCursor::GetVertexId
vtkIdType GetVertexId()
Return the index of the current vertex in the tree.
vtkHyperTreeGridOrientedCursor::SetMask
void SetMask(bool state)
Set the blanking mask is empty or not.
vtkHyperTreeGridOrientedCursor::GetGlobalNodeIndex
vtkIdType GetGlobalNodeIndex()
Return the global index (relative to the grid) of the current vertex in the tree.
vtkHyperTreeGridOrientedCursor::ToChild
void ToChild(unsigned char ichild)
Move the cursor to child ‘child’ of the current vertex.
vtkHyperTreeGridOrientedCursor::SetGlobalIndexFromLocal
void SetGlobalIndexFromLocal(vtkIdType index)
JB.
vtkHyperTreeGridOrientedCursor::Grid
vtkHyperTreeGrid * Grid
JB Reference sur l'hyper tree grid parcouru actuellement.
Definition: vtkHyperTreeGridOrientedCursor.h:177
vtkHyperTreeGridOrientedCursor::Tree
vtkHyperTree * Tree
JB.
Definition: vtkHyperTreeGridOrientedCursor.h:182
vtkHyperTreeGridOrientedCursor::~vtkHyperTreeGridOrientedCursor
~vtkHyperTreeGridOrientedCursor() override
Destructor.
vtkHyperTreeGridOrientedCursor::Initialize
void Initialize(vtkHyperTreeGrid *grid, vtkIdType treeIndex, bool create=false)
Initialize cursor at root of given tree index in grid.
vtkHyperTreeGridOrientedCursor::HasTree
bool HasTree() const
Return if a Tree pointing exist.
vtkHyperTreeGridOrientedCursor::GetNumberOfChildren
unsigned char GetNumberOfChildren()
Return the number of children for each node (non-vertex leaf) of the tree.
vtkHyperTreeGridOrientedCursor::IsLeaf
bool IsLeaf()
Is the cursor pointing to a leaf?
vtkHyperTreeGridOrientedCursor::Initialize
void Initialize(vtkHyperTreeGrid *grid, vtkHyperTree *tree, unsigned int level, vtkHyperTreeGridEntry &entry)
JB.
vtkHyperTreeGridOrientedCursor::GetDimension
unsigned char GetDimension()
Return the dimension of the tree.
vtkHyperTreeGridOrientedCursor::New
static vtkHyperTreeGridOrientedCursor * New()
vtkHyperTreeGridOrientedCursor::SubdivideLeaf
void SubdivideLeaf()
JB Fait chier normalement on devrait passer par GetEntry.
vtkHyperTreeGridOrientedCursor::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkHyperTreeGrid
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
Definition: vtkHyperTreeGrid.h:91
vtkHyperTree
A data object structured as a tree.
Definition: vtkHyperTree.h:169
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:61
vtkX3D::level
@ level
Definition: vtkX3D.h:395
vtkX3D::index
@ index
Definition: vtkX3D.h:246
vtkHyperTreeGridEntry.h
vtkObject.h
vtkIdType
int vtkIdType
Definition: vtkType.h:315