VTK  9.7.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
31 #ifndef vtkHyperTreeGridOrientedCursor_h
32 #define vtkHyperTreeGridOrientedCursor_h
33 
34 #include "vtkCommonDataModelModule.h" // For export macro
35 #include "vtkHyperTreeGridEntry.h" // Used internally
36 #include "vtkObject.h"
37 
38 VTK_ABI_NAMESPACE_BEGIN
39 class vtkHyperTree;
40 class vtkHyperTreeGrid;
41 
42 class VTKCOMMONDATAMODEL_EXPORT vtkHyperTreeGridOrientedCursor : public vtkObject
43 {
44 public:
46  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
54 
56 
59  void Initialize(vtkHyperTreeGrid* grid, vtkIdType treeIndex, bool create = false);
60  void Initialize(vtkHyperTreeGrid* grid, vtkHyperTree* tree, unsigned int level, vtkIdType index);
61  void Initialize(
62  vtkHyperTreeGrid* grid, vtkHyperTree* tree, unsigned int level, vtkHyperTreeGridEntry& entry);
64 
66 
69  vtkHyperTreeGrid* GetGrid();
71 
73 
76  bool HasTree() const;
78 
80 
83  vtkHyperTree* GetTree() const;
85 
89  vtkIdType GetVertexId();
90 
95  vtkIdType GetGlobalNodeIndex();
96 
101  unsigned char GetDimension();
102 
107  unsigned char GetNumberOfChildren();
108 
109  void SetGlobalIndexStart(vtkIdType index);
110  void SetGlobalIndexFromLocal(vtkIdType index);
111 
116  void SetMask(bool state);
117 
121  bool IsMasked();
122 
126  bool IsLeaf();
127 
128  void SubdivideLeaf();
129 
133  bool IsRoot();
134 
138  unsigned int GetLevel();
139 
147  void ToChild(unsigned char ichild);
148 
149 protected:
154 
158  ~vtkHyperTreeGridOrientedCursor() override;
159 
164 
166  unsigned int Level;
167 
168  // Hyper tree grid to which the cursor is attached
170 
171 private:
173  void operator=(const vtkHyperTreeGridOrientedCursor&) = delete;
174 };
175 VTK_ABI_NAMESPACE_END
176 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:52
vtkHyperTreeGrid * Grid
Reference to the HTG currently processed.
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:363
a simple class to control print indentation
Definition: vtkIndent.h:28
Entries are cache data for cursors.
Objects for traversal a HyperTreeGrid.
A data object structured as a tree.
Definition: vtkHyperTree.h:170
bool HasTree(const T &e)
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...