VTK: Common/DataModel/vtkHyperTreeGridNonOrientedUnlimitedSuperCursor.h Source File

| VTK 9.3.1

vtkHyperTreeGridNonOrientedUnlimitedSuperCursor.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
11 #ifndef vtkHyperTreeGridNonOrientedUnlimitedSuperCursor_h
12 #define vtkHyperTreeGridNonOrientedUnlimitedSuperCursor_h
13
14 #include "vtkCommonDataModelModule.h" // For export macro
15 #include "vtkObject.h"
16 #include "vtkSmartPointer.h" // Used internally
17
18 #include "vtkHyperTreeGridGeometryUnlimitedLevelEntry.h" // Used Internally
19
20 #include <vector> // For std::vector
21
22 VTK_ABI_NAMESPACE_BEGIN
23 class vtkHyperTree;
24 class vtkHyperTreeGrid;
25 class vtkHyperTreeGridNonOrientedGeometryCursor;
26 class vtkHyperTreeGridOrientedGeometryCursor;
27 class vtkHyperTreeGridNonOrientedUnlimitedGeometryCursor;
28
29 class VTKCOMMONDATAMODEL_EXPORT vtkHyperTreeGridNonOrientedUnlimitedSuperCursor : public vtkObject
30 {
31 public:
32 vtkTypeMacro(vtkHyperTreeGridNonOrientedUnlimitedSuperCursor, vtkObject);
33 void PrintSelf(ostream& os, vtkIndent indent) override;
34
39 virtual vtkHyperTreeGridNonOrientedUnlimitedSuperCursor* Clone();
40
45 virtual void Initialize(vtkHyperTreeGrid* grid, vtkIdType treeIndex, bool create = false) = 0;
46
48
51 vtkHyperTreeGrid* GetGrid();
53
55
58 bool HasTree();
60
64 bool HasTree(unsigned int icursor);
65
67
70 vtkHyperTree* GetTree();
71 vtkHyperTree* GetTree(unsigned int icursor);
73
75
78 vtkIdType GetVertexId();
79 vtkIdType GetVertexId(unsigned int icursor);
81
86 vtkIdType GetGlobalNodeIndex();
87
92 vtkIdType GetGlobalNodeIndex(unsigned int icursor);
93
97 vtkHyperTree* GetInformation(
98 unsigned int icursor, unsigned int& level, bool& leaf, vtkIdType& id);
99
104 unsigned char GetDimension();
105
110 unsigned char GetNumberOfChildren();
111
115 void SetGlobalIndexStart(vtkIdType index);
116
120 void SetGlobalIndexFromLocal(vtkIdType index);
121
125 double* GetOrigin();
126 double* GetSize();
127
132 void SetMask(bool state);
133 void SetMask(unsigned int icursor, bool state);
134
138 bool IsMasked();
139 bool IsMasked(unsigned int icursor);
140
144 void GetBounds(double bounds[6]);
145 void GetBounds(unsigned int icursor, double bounds[6]);
146
150 void GetPoint(double point[3]);
151 void GetPoint(unsigned int icursor, double point[3]);
152
154
157 bool IsLeaf();
158 bool IsLeaf(unsigned int icursor);
159 bool IsRealLeaf();
160 bool IsRealLeaf(unsigned int icursor);
162
164
167 bool IsVirtualLeaf();
168 bool IsVirtualLeaf(unsigned int icursor);
170
172
179 double GetExtensivePropertyRatio();
180 double GetExtensivePropertyRatio(vtkIdType index);
182
186 bool IsRoot();
187
189
192 unsigned int GetLevel();
193 unsigned int GetLevel(unsigned int icursor);
194 unsigned int GetLastRealLevel();
195 unsigned int GetLastRealLevel(unsigned int icursor);
197
205 void ToChild(unsigned char ichild);
206
212 void ToRoot();
213
219 void ToParent();
220
224 unsigned int GetNumberOfCursors() { return this->NumberOfCursors; }
225
231 vtkSmartPointer<vtkHyperTreeGridOrientedGeometryCursor> GetOrientedGeometryCursor(
232 unsigned int icursor);
233
239 vtkSmartPointer<vtkHyperTreeGridNonOrientedGeometryCursor> GetNonOrientedGeometryCursor(
240 unsigned int icursor);
241
242 protected:
246 vtkHyperTreeGridNonOrientedUnlimitedSuperCursor();
247
251 ~vtkHyperTreeGridNonOrientedUnlimitedSuperCursor() override;
252
256 vtkHyperTreeGrid* Grid = nullptr;
257
261 vtkSmartPointer<vtkHyperTreeGridNonOrientedUnlimitedGeometryCursor> CentralCursor;
262
266 unsigned int CurrentFirstNonValidEntryByLevel = 0;
267 std::vector<unsigned int> FirstNonValidEntryByLevel;
268 std::vector<vtkHyperTreeGridGeometryUnlimitedLevelEntry> Entries;
269
274 unsigned int FirstCurrentNeighboorReferenceEntry = 0;
275 std::vector<unsigned int> ReferenceEntries;
276
280 unsigned int GetIndiceEntry(unsigned int icursor);
281
285 unsigned int GetIndicePreviousEntry(unsigned int icursor);
286
290 unsigned int IndiceCentralCursor = 0;
291
292 // Number of cursors in supercursor
293 unsigned int NumberOfCursors = 0;
294
295 // Super cursor traversal table to go retrieve the parent index for each cursor
296 // of the child node. There are f^d * NumberOfCursors entries in the table.
297 const unsigned int* ChildCursorToParentCursorTable = nullptr;
298
299 // Super cursor traversal table to go retrieve the child index for each cursor
300 // of the child node. There are f^d * NumberOfCursors entries in the table.
301 const unsigned int* ChildCursorToChildTable = nullptr;
302
303 private:
304 vtkHyperTreeGridNonOrientedUnlimitedSuperCursor(
305 const vtkHyperTreeGridNonOrientedUnlimitedSuperCursor&) = delete;
306 void operator=(const vtkHyperTreeGridNonOrientedUnlimitedSuperCursor&) = delete;
307 };
308
309 VTK_ABI_NAMESPACE_END
310 #endif
vtkHyperTreeGridNonOrientedGeometryCursor
Objects for traversal a HyperTreeGrid.
Definition: vtkHyperTreeGridNonOrientedGeometryCursor.h:52
vtkHyperTreeGridNonOrientedUnlimitedGeometryCursor
Objects for traversal a HyperTreeGrid.
Definition: vtkHyperTreeGridNonOrientedUnlimitedGeometryCursor.h:54
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor
Objects for traversal a HyperTreeGrid.
Definition: vtkHyperTreeGridNonOrientedUnlimitedSuperCursor.h:30
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetInformation
vtkHyperTree * GetInformation(unsigned int icursor, unsigned int &level, bool &leaf, vtkIdType &id)
JB.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetOrientedGeometryCursor
vtkSmartPointer< vtkHyperTreeGridOrientedGeometryCursor > GetOrientedGeometryCursor(unsigned int icursor)
Return the cursor pointing into i-th neighbor.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetPoint
void GetPoint(double point[3])
JB Coordonnees du centre de la maille.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::SetMask
void SetMask(unsigned int icursor, bool state)
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::SetGlobalIndexFromLocal
void SetGlobalIndexFromLocal(vtkIdType index)
JB.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetIndicePreviousEntry
unsigned int GetIndicePreviousEntry(unsigned int icursor)
JB La valeur precedente.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetSize
double * GetSize()
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::IsMasked
bool IsMasked(unsigned int icursor)
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::Entries
std::vector< vtkHyperTreeGridGeometryUnlimitedLevelEntry > Entries
Definition: vtkHyperTreeGridNonOrientedUnlimitedSuperCursor.h:268
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::ReferenceEntries
std::vector< unsigned int > ReferenceEntries
Definition: vtkHyperTreeGridNonOrientedUnlimitedSuperCursor.h:275
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetLastRealLevel
unsigned int GetLastRealLevel(unsigned int icursor)
Get the level of the tree vertex pointed by the cursor.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetExtensivePropertyRatio
double GetExtensivePropertyRatio(vtkIdType index)
returns the value of the ratio to be applied to extensive value for the current cursor,...
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetLevel
unsigned int GetLevel()
Get the level of the tree vertex pointed by the cursor.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::IsMasked
bool IsMasked()
Determine whether blanking mask is empty or not.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::HasTree
bool HasTree(unsigned int icursor)
JB Return if a Tree pointing exist.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetIndiceEntry
unsigned int GetIndiceEntry(unsigned int icursor)
JB.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::Initialize
virtual void Initialize(vtkHyperTreeGrid *grid, vtkIdType treeIndex, bool create=false)=0
Initialize cursor at root of given tree index in grid.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetGlobalNodeIndex
vtkIdType GetGlobalNodeIndex()
Return the global index (relative to the grid) of the current vertex in the tree.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetDimension
unsigned char GetDimension()
Return the dimension of the tree.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetBounds
void GetBounds(double bounds[6])
JB Coordonnees de la boite englobante.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetTree
vtkHyperTree * GetTree()
Set the hyper tree to which the cursor is pointing.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::IsLeaf
bool IsLeaf(unsigned int icursor)
Is the cursor pointing to a leaf?
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetNonOrientedGeometryCursor
vtkSmartPointer< vtkHyperTreeGridNonOrientedGeometryCursor > GetNonOrientedGeometryCursor(unsigned int icursor)
Return the cursor pointing into i-th neighbor.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetNumberOfCursors
unsigned int GetNumberOfCursors()
JB.
Definition: vtkHyperTreeGridNonOrientedUnlimitedSuperCursor.h:224
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::~vtkHyperTreeGridNonOrientedUnlimitedSuperCursor
~vtkHyperTreeGridNonOrientedUnlimitedSuperCursor() override
Destructor.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetGlobalNodeIndex
vtkIdType GetGlobalNodeIndex(unsigned int icursor)
JB Return the global index (relative to the grid) of the neighboor icursor current vertex in the tree...
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetLevel
unsigned int GetLevel(unsigned int icursor)
Get the level of the tree vertex pointed by the cursor.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::CentralCursor
vtkSmartPointer< vtkHyperTreeGridNonOrientedUnlimitedGeometryCursor > CentralCursor
JB.
Definition: vtkHyperTreeGridNonOrientedUnlimitedSuperCursor.h:261
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::IsRealLeaf
bool IsRealLeaf(unsigned int icursor)
Is the cursor pointing to a leaf?
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::FirstNonValidEntryByLevel
std::vector< unsigned int > FirstNonValidEntryByLevel
Definition: vtkHyperTreeGridNonOrientedUnlimitedSuperCursor.h:267
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::IsVirtualLeaf
bool IsVirtualLeaf(unsigned int icursor)
Is the cursor pointing to a real node in the tree.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetTree
vtkHyperTree * GetTree(unsigned int icursor)
Set the hyper tree to which the cursor is pointing.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetVertexId
vtkIdType GetVertexId(unsigned int icursor)
Return the index of the current vertex in the tree.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetExtensivePropertyRatio
double GetExtensivePropertyRatio()
returns the value of the ratio to be applied to extensive value for the current cursor,...
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetOrigin
double * GetOrigin()
JB.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::SetMask
void SetMask(bool state)
Set the blanking mask is empty or not.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::IsRealLeaf
bool IsRealLeaf()
Is the cursor pointing to a leaf?
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::Clone
virtual vtkHyperTreeGridNonOrientedUnlimitedSuperCursor * Clone()
Create a copy of ‘this’.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::IsRoot
bool IsRoot()
Is the cursor at tree root?
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetBounds
void GetBounds(unsigned int icursor, double bounds[6])
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::IsLeaf
bool IsLeaf()
Is the cursor pointing to a leaf?
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetVertexId
vtkIdType GetVertexId()
Return the index of the current vertex in the tree.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::ToRoot
void ToRoot()
Move the cursor to the root vertex.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::IsVirtualLeaf
bool IsVirtualLeaf()
Is the cursor pointing to a real node in the tree.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::ToChild
void ToChild(unsigned char ichild)
Move the cursor to child ‘child’ of the current vertex.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetNumberOfChildren
unsigned char GetNumberOfChildren()
Return the number of children for each node (non-vertex leaf) of the tree.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::HasTree
bool HasTree()
Return if a Tree pointing exist.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetGrid
vtkHyperTreeGrid * GetGrid()
Set the hyper tree grid to which the cursor is pointing.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetLastRealLevel
unsigned int GetLastRealLevel()
Get the level of the tree vertex pointed by the cursor.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::vtkHyperTreeGridNonOrientedUnlimitedSuperCursor
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor()
Constructor.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::SetGlobalIndexStart
void SetGlobalIndexStart(vtkIdType index)
JB.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::ToParent
void ToParent()
Move the cursor to the parent of the current vertex.
vtkHyperTreeGridNonOrientedUnlimitedSuperCursor::GetPoint
void GetPoint(unsigned int icursor, double point[3])
vtkHyperTreeGridOrientedGeometryCursor
Objects for traversal a HyperTreeGrid.
Definition: vtkHyperTreeGridOrientedGeometryCursor.h:44
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
vtkSmartPointer
Hold a reference to a vtkObjectBase instance.
Definition: vtkSmartPointer.h:41
vtkX3D::point
@ point
Definition: vtkX3D.h:236
vtkX3D::level
@ level
Definition: vtkX3D.h:395
vtkX3D::index
@ index
Definition: vtkX3D.h:246
vtkHyperTreeGridGeometryUnlimitedLevelEntry.h
vtkObject.h
vtkSmartPointer.h
vtkIdType
int vtkIdType
Definition: vtkType.h:315