VTK  9.3.0
vtkHyperTreeGridNonOrientedSuperCursor.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
30#ifndef vtkHyperTreeGridNonOrientedSuperCursor_h
31#define vtkHyperTreeGridNonOrientedSuperCursor_h
32
33#include "vtkCommonDataModelModule.h" // For export macro
34#include "vtkObject.h"
35#include "vtkSmartPointer.h" // Used internally
36
37#include "vtkHyperTreeGridGeometryLevelEntry.h" // Used Internally
38
39#include <vector> // For std::vector
40
41VTK_ABI_NAMESPACE_BEGIN
42class vtkHyperTree;
46
47class VTKCOMMONDATAMODEL_EXPORT vtkHyperTreeGridNonOrientedSuperCursor : public vtkObject
48{
49public:
51 void PrintSelf(ostream& os, vtkIndent indent) override;
52
58
63 virtual void Initialize(vtkHyperTreeGrid* grid, vtkIdType treeIndex, bool create = false) = 0;
64
66
71
73
76 bool HasTree();
78
82 bool HasTree(unsigned int icursor);
83
85
89 vtkHyperTree* GetTree(unsigned int icursor);
91
96 vtkIdType GetVertexId(unsigned int icursor);
97
103
108 vtkIdType GetGlobalNodeIndex(unsigned int icursor);
109
114 unsigned int icursor, unsigned int& level, bool& leaf, vtkIdType& id);
115
120 unsigned char GetDimension();
121
126 unsigned char GetNumberOfChildren();
127
132
137
141 double* GetOrigin();
142 double* GetSize();
143
148 void SetMask(bool state);
149 void SetMask(unsigned int icursor, bool state);
150
154 bool IsMasked();
155 bool IsMasked(unsigned int icursor);
156
160 void GetBounds(double bounds[6]);
161 void GetBounds(unsigned int icursor, double bounds[6]);
162
166 void GetPoint(double point[3]);
167 void GetPoint(unsigned int icursor, double point[3]);
168
172 bool IsLeaf();
173 bool IsLeaf(unsigned int icursor);
174
179
183 bool IsRoot();
184
188 unsigned int GetLevel();
189 unsigned int GetLevel(unsigned int icursor);
190
198 void ToChild(unsigned char ichild);
199
205 void ToRoot();
206
212 void ToParent();
213
217 unsigned int GetNumberOfCursors() { return this->NumberOfCursors; }
218
225 unsigned int icursor);
226
233 unsigned int icursor);
234
235protected:
240
245
250
254 // JB vtkNew< vtkHyperTreeGridNonOrientedGeometryCursor > CentralCursor;
256
261 std::vector<unsigned int> FirstNonValidEntryByLevel;
262 std::vector<vtkHyperTreeGridGeometryLevelEntry> Entries;
263
269 std::vector<unsigned int> ReferenceEntries;
270
274 unsigned int GetIndiceEntry(unsigned int icursor);
275
279 unsigned int GetIndicePreviousEntry(unsigned int icursor);
280
285
286 // Number of cursors in supercursor
287 unsigned int NumberOfCursors;
288
289 // Super cursor traversal table to go retrieve the parent index for each cursor
290 // of the child node. There are f^d * NumberOfCursors entries in the table.
292
293 // Super cursor traversal table to go retrieve the child index for each cursor
294 // of the child node. There are f^d * NumberOfCursors entries in the table.
295 const unsigned int* ChildCursorToChildTable;
296
297private:
299 void operator=(const vtkHyperTreeGridNonOrientedSuperCursor&) = delete;
300};
301
302VTK_ABI_NAMESPACE_END
303#endif
vtkHyperTree * GetTree()
Set the hyper tree to which the cursor is pointing.
void GetBounds(double bounds[6])
JB Coordonnees de la boite englobante.
bool IsLeaf(unsigned int icursor)
void GetPoint(unsigned int icursor, double point[3])
bool IsMasked()
Determine whether blanking mask is empty or not.
vtkHyperTree * GetInformation(unsigned int icursor, unsigned int &level, bool &leaf, vtkIdType &id)
JB.
std::vector< vtkHyperTreeGridGeometryLevelEntry > Entries
bool IsLeaf()
Is the cursor pointing to a leaf?
~vtkHyperTreeGridNonOrientedSuperCursor() override
Destructor.
bool IsMasked(unsigned int icursor)
vtkHyperTreeGrid * GetGrid()
Set the hyper tree grid to which the cursor is pointing.
void GetPoint(double point[3])
JB Coordonnees du centre de la maille.
void ToParent()
Move the cursor to the parent of the current vertex.
vtkIdType GetGlobalNodeIndex()
Return the global index (relative to the grid) of the current vertex in the tree.
unsigned int GetLevel()
Get the level of the tree vertex pointed by the cursor.
bool HasTree()
Return if a Tree pointing exist.
virtual vtkHyperTreeGridNonOrientedSuperCursor * Clone()
Create a copy of ‘this’.
vtkHyperTreeGridNonOrientedSuperCursor()
Constructor.
void ToRoot()
Move the cursor to the root vertex.
unsigned int CurrentFirstNonValidEntryByLevel
JB Hyper tree grid to which the cursor is attached.
unsigned int GetIndicePreviousEntry(unsigned int icursor)
JB La valeur precedente.
bool IsRoot()
Is the cursor at tree root?
void ToChild(unsigned char ichild)
Move the cursor to child ‘child’ of the current vertex.
unsigned int FirstCurrentNeighboorReferenceEntry
JB La derniere reference valide pour decrire tous les voisins.
unsigned int GetLevel(unsigned int icursor)
void SetGlobalIndexFromLocal(vtkIdType index)
JB.
vtkSmartPointer< vtkHyperTreeGridNonOrientedGeometryCursor > GetNonOrientedGeometryCursor(unsigned int icursor)
Return the cursor pointing into i-th neighbor.
unsigned char GetDimension()
Return the dimension of the tree.
vtkHyperTree * GetTree(unsigned int icursor)
Set the hyper tree to which the cursor is pointing.
void SubdivideLeaf()
JB Fait chier normalement on devrait passer par GetEntry.
bool HasTree(unsigned int icursor)
JB Return if a Tree pointing exist.
vtkSmartPointer< vtkHyperTreeGridOrientedGeometryCursor > GetOrientedGeometryCursor(unsigned int icursor)
Return the cursor pointing into i-th neighbor.
vtkIdType GetGlobalNodeIndex(unsigned int icursor)
JB Return the global index (relative to the grid) of the neighbor icursor current vertex in the tree.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void Initialize(vtkHyperTreeGrid *grid, vtkIdType treeIndex, bool create=false)=0
Initialize cursor at root of given tree index in grid.
void SetGlobalIndexStart(vtkIdType index)
JB.
unsigned int GetIndiceEntry(unsigned int icursor)
JB.
void SetMask(unsigned int icursor, bool state)
vtkHyperTreeGrid * Grid
JB Reference sur l'hyper tree grid parcouru actuellement.
vtkIdType GetVertexId(unsigned int icursor)
void SetMask(bool state)
Set the blanking mask is empty or not.
vtkIdType GetVertexId()
Return the index of the current vertex in the tree.
unsigned char GetNumberOfChildren()
Return the number of children for each node (non-vertex leaf) of the tree.
vtkSmartPointer< vtkHyperTreeGridNonOrientedGeometryCursor > CentralCursor
JB.
void GetBounds(unsigned int icursor, double bounds[6])
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
A data object structured as a tree.
a simple class to control print indentation
Definition vtkIndent.h:29
abstract base class for most VTK objects
Definition vtkObject.h:49
Hold a reference to a vtkObjectBase instance.
int vtkIdType
Definition vtkType.h:315