VTK  9.2.6
vtkHyperTreeGridOrientedCursor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkHyperTreeGridOrientedCursor.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 notice for more information.
13 
14 =========================================================================*/
38 #ifndef vtkHyperTreeGridOrientedCursor_h
39 #define vtkHyperTreeGridOrientedCursor_h
40 
41 #include "vtkCommonDataModelModule.h" // For export macro
42 #include "vtkHyperTreeGridEntry.h" // Used internally
43 #include "vtkObject.h"
44 
45 class vtkHyperTree;
46 class vtkHyperTreeGrid;
47 
48 class VTKCOMMONDATAMODEL_EXPORT vtkHyperTreeGridOrientedCursor : public vtkObject
49 {
50 public:
52  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
60 
64  void Initialize(vtkHyperTreeGrid* grid, vtkIdType treeIndex, bool create = false);
65 
69  void Initialize(vtkHyperTreeGrid* grid, vtkHyperTree* tree, unsigned int level, vtkIdType index);
70 
74  void Initialize(
75  vtkHyperTreeGrid* grid, vtkHyperTree* tree, unsigned int level, vtkHyperTreeGridEntry& entry);
76 
78 
81  vtkHyperTreeGrid* GetGrid();
83 
85 
88  bool HasTree() const;
90 
92 
95  vtkHyperTree* GetTree() const;
97 
101  vtkIdType GetVertexId();
102 
107  vtkIdType GetGlobalNodeIndex();
108 
113  unsigned char GetDimension();
114 
119  unsigned char GetNumberOfChildren();
120 
124  void SetGlobalIndexStart(vtkIdType index);
125 
129  void SetGlobalIndexFromLocal(vtkIdType index);
130 
135  void SetMask(bool state);
136 
140  bool IsMasked();
141 
145  bool IsLeaf();
146 
150  void SubdivideLeaf();
151 
155  bool IsRoot();
156 
160  unsigned int GetLevel();
161 
169  void ToChild(unsigned char ichild);
170 
171 protected:
176 
180  ~vtkHyperTreeGridOrientedCursor() override;
181 
186 
191 
195  unsigned int Level;
196 
197  // Hyper tree grid to which the cursor is attached
199 
200 private:
202  void operator=(const vtkHyperTreeGridOrientedCursor&) = delete;
203 };
204 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkHyperTreeGrid * Grid
JB Reference sur l'hyper tree grid parcouru actuellement.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
int vtkIdType
Definition: vtkType.h:332
a simple class to control print indentation
Definition: vtkIndent.h:39
Entries are cache data for cursors.
Objects for traversal a HyperTreeGrid.
A data object structured as a tree.
Definition: vtkHyperTree.h:179
bool HasTree(const T &e)
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...