VTK  9.0.1
vtkHyperTreeGridNonOrientedSuperCursor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkHyperTreeGridNonOrientedSuperCursor.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 Nonice for more information.
13 
14 =========================================================================*/
38 #ifndef vtkHyperTreeGridNonOrientedSuperCursor_h
39 #define vtkHyperTreeGridNonOrientedSuperCursor_h
40 
41 #include "vtkCommonDataModelModule.h" // For export macro
42 #include "vtkObject.h"
43 #include "vtkSmartPointer.h" // Used internally
44 
45 #include "vtkHyperTreeGridGeometryLevelEntry.h" // Used Internally
46 
47 #include <vector> // For std::vector
48 
49 class vtkHyperTree;
50 class vtkHyperTreeGrid;
53 
54 class VTKCOMMONDATAMODEL_EXPORT vtkHyperTreeGridNonOrientedSuperCursor : public vtkObject
55 {
56 public:
58  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
65 
70  virtual void Initialize(vtkHyperTreeGrid* grid, vtkIdType treeIndex, bool create = false) = 0;
71 
73 
78 
80 
83  bool HasTree();
85 
89  bool HasTree(unsigned int icursor);
90 
92 
96  vtkHyperTree* GetTree(unsigned int icursor);
98 
103  vtkIdType GetVertexId(unsigned int icursor);
104 
110 
115  vtkIdType GetGlobalNodeIndex(unsigned int icursor);
116 
121  unsigned int icursor, unsigned int& level, bool& leaf, vtkIdType& id);
122 
127  unsigned char GetDimension();
128 
133  unsigned char GetNumberOfChildren();
134 
139 
144 
148  double* GetOrigin();
149  double* GetSize();
150 
155  void SetMask(bool state);
156  void SetMask(unsigned int icursor, bool state);
157 
161  bool IsMasked();
162  bool IsMasked(unsigned int icursor);
163 
167  void GetBounds(double bounds[6]);
168  void GetBounds(unsigned int icursor, double bounds[6]);
169 
173  void GetPoint(double point[3]);
174  void GetPoint(unsigned int icursor, double point[3]);
175 
179  bool IsLeaf();
180  bool IsLeaf(unsigned int icursor);
181 
186 
190  bool IsRoot();
191 
195  unsigned int GetLevel();
196  unsigned int GetLevel(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 
232  unsigned int icursor);
233 
240  unsigned int icursor);
241 
242 protected:
247 
252 
257 
261  // JB vtkNew< vtkHyperTreeGridNonOrientedGeometryCursor > CentralCursor;
263 
268  std::vector<unsigned int> FirstNonValidEntryByLevel;
269  std::vector<vtkHyperTreeGridGeometryLevelEntry> Entries;
270 
276  std::vector<unsigned int> ReferenceEntries;
277 
281  unsigned int GetIndiceEntry(unsigned int icursor);
282 
286  unsigned int GetIndicePreviousEntry(unsigned int icursor);
287 
291  unsigned int IndiceCentralCursor;
292 
293  // Number of cursors in supercursor
294  unsigned int NumberOfCursors;
295 
296  // Super cursor traversal table to go retrieve the parent index for each cursor
297  // of the child node. There are f^d * NumberOfCursors entries in the table.
298  const unsigned int* ChildCursorToParentCursorTable;
299 
300  // Super cursor traversal table to go retrieve the child index for each cursor
301  // of the child node. There are f^d * NumberOfCursors entries in the table.
302  const unsigned int* ChildCursorToChildTable;
303 
304 private:
306  void operator=(const vtkHyperTreeGridNonOrientedSuperCursor&) = delete;
307 };
308 
309 #endif
vtkHyperTreeGridNonOrientedSuperCursor::GetPoint
void GetPoint(unsigned int icursor, double point[3])
vtkHyperTreeGridNonOrientedGeometryCursor
Objects for traversal a HyperTreeGrid.
Definition: vtkHyperTreeGridNonOrientedGeometryCursor.h:57
vtkHyperTreeGridNonOrientedSuperCursor::IsMasked
bool IsMasked()
Determine whether blanking mask is empty or not.
vtkHyperTreeGridNonOrientedSuperCursor::Entries
std::vector< vtkHyperTreeGridGeometryLevelEntry > Entries
Definition: vtkHyperTreeGridNonOrientedSuperCursor.h:269
vtkHyperTreeGridNonOrientedSuperCursor::GetIndiceEntry
unsigned int GetIndiceEntry(unsigned int icursor)
JB.
vtkHyperTreeGridNonOrientedSuperCursor::GetGrid
vtkHyperTreeGrid * GetGrid()
Set the hyper tree grid to which the cursor is pointing.
vtkHyperTreeGridNonOrientedSuperCursor::GetTree
vtkHyperTree * GetTree(unsigned int icursor)
vtkHyperTreeGridNonOrientedSuperCursor::Grid
vtkHyperTreeGrid * Grid
JB Reference sur l'hyper tree grid parcouru actuellement.
Definition: vtkHyperTreeGridNonOrientedSuperCursor.h:256
vtkHyperTreeGridNonOrientedSuperCursor::GetLevel
unsigned int GetLevel()
Get the level of the tree vertex pointed by the cursor.
vtkHyperTreeGridNonOrientedSuperCursor::ToParent
void ToParent()
Move the cursor to the parent of the current vertex.
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkHyperTreeGridNonOrientedSuperCursor::GetNumberOfChildren
unsigned char GetNumberOfChildren()
Return the number of children for each node (non-vertex leaf) of the tree.
vtkHyperTreeGridNonOrientedSuperCursor::GetLevel
unsigned int GetLevel(unsigned int icursor)
vtkHyperTreeGridNonOrientedSuperCursor
Objects for traversal a HyperTreeGrid.
Definition: vtkHyperTreeGridNonOrientedSuperCursor.h:55
vtkHyperTreeGridNonOrientedSuperCursor::IsMasked
bool IsMasked(unsigned int icursor)
vtkHyperTreeGridNonOrientedSuperCursor::SubdivideLeaf
void SubdivideLeaf()
JB Fait chier normalement on devrait passer par GetEntry.
vtkSmartPointer
Hold a reference to a vtkObjectBase instance.
Definition: vtkSmartPointer.h:36
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:54
vtkHyperTreeGridNonOrientedSuperCursor::GetGlobalNodeIndex
vtkIdType GetGlobalNodeIndex(unsigned int icursor)
JB Return the global index (relative to the grid) of the neighboor icursor current vertex in the tree...
vtkHyperTreeGridNonOrientedSuperCursor::SetMask
void SetMask(unsigned int icursor, bool state)
vtkHyperTreeGridNonOrientedSuperCursor::FirstCurrentNeighboorReferenceEntry
unsigned int FirstCurrentNeighboorReferenceEntry
JB La derniere reference valide pour decrire tous les voisins.
Definition: vtkHyperTreeGridNonOrientedSuperCursor.h:275
vtkHyperTreeGridNonOrientedSuperCursor::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkHyperTreeGridNonOrientedSuperCursor::NumberOfCursors
unsigned int NumberOfCursors
Definition: vtkHyperTreeGridNonOrientedSuperCursor.h:294
vtkHyperTreeGridNonOrientedSuperCursor::ChildCursorToChildTable
const unsigned int * ChildCursorToChildTable
Definition: vtkHyperTreeGridNonOrientedSuperCursor.h:302
vtkHyperTreeGridNonOrientedSuperCursor::IndiceCentralCursor
unsigned int IndiceCentralCursor
JB.
Definition: vtkHyperTreeGridNonOrientedSuperCursor.h:291
vtkHyperTreeGridNonOrientedSuperCursor::IsRoot
bool IsRoot()
Is the cursor at tree root?
vtkHyperTreeGridNonOrientedSuperCursor::GetBounds
void GetBounds(unsigned int icursor, double bounds[6])
vtkHyperTreeGridNonOrientedSuperCursor::~vtkHyperTreeGridNonOrientedSuperCursor
~vtkHyperTreeGridNonOrientedSuperCursor() override
Destructor.
vtkHyperTreeGridNonOrientedSuperCursor::HasTree
bool HasTree()
Return if a Tree pointing exist.
vtkHyperTreeGridNonOrientedSuperCursor::Initialize
virtual void Initialize(vtkHyperTreeGrid *grid, vtkIdType treeIndex, bool create=false)=0
Initialize cursor at root of given tree index in grid.
vtkX3D::level
@ level
Definition: vtkX3D.h:401
vtkX3D::point
@ point
Definition: vtkX3D.h:242
vtkHyperTreeGridNonOrientedSuperCursor::SetMask
void SetMask(bool state)
Set the blanking mask is empty or not.
vtkHyperTreeGridNonOrientedSuperCursor::GetOrigin
double * GetOrigin()
JB.
vtkHyperTreeGridNonOrientedSuperCursor::IsLeaf
bool IsLeaf()
Is the cursor pointing to a leaf?
vtkHyperTreeGridNonOrientedSuperCursor::GetGlobalNodeIndex
vtkIdType GetGlobalNodeIndex()
Return the global index (relative to the grid) of the current vertex in the tree.
vtkHyperTreeGridNonOrientedSuperCursor::FirstNonValidEntryByLevel
std::vector< unsigned int > FirstNonValidEntryByLevel
Definition: vtkHyperTreeGridNonOrientedSuperCursor.h:268
vtkHyperTreeGridNonOrientedSuperCursor::GetIndicePreviousEntry
unsigned int GetIndicePreviousEntry(unsigned int icursor)
JB La valeur precedente.
vtkHyperTreeGridNonOrientedSuperCursor::Clone
virtual vtkHyperTreeGridNonOrientedSuperCursor * Clone()
Create a copy of ‘this’.
vtkHyperTreeGridOrientedGeometryCursor
Objects for traversal a HyperTreeGrid.
Definition: vtkHyperTreeGridOrientedGeometryCursor.h:55
vtkHyperTreeGridNonOrientedSuperCursor::CentralCursor
vtkSmartPointer< vtkHyperTreeGridNonOrientedGeometryCursor > CentralCursor
JB.
Definition: vtkHyperTreeGridNonOrientedSuperCursor.h:262
vtkHyperTreeGridNonOrientedSuperCursor::IsLeaf
bool IsLeaf(unsigned int icursor)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkHyperTreeGridNonOrientedSuperCursor::GetOrientedGeometryCursor
vtkSmartPointer< vtkHyperTreeGridOrientedGeometryCursor > GetOrientedGeometryCursor(unsigned int icursor)
Return the cursor pointing into i-th neighbor.
vtkHyperTreeGridNonOrientedSuperCursor::GetVertexId
vtkIdType GetVertexId()
Return the index of the current vertex in the tree.
vtkSmartPointer.h
vtkHyperTreeGridNonOrientedSuperCursor::GetBounds
void GetBounds(double bounds[6])
JB Coordonnees de la boite englobante.
vtkHyperTreeGridNonOrientedSuperCursor::SetGlobalIndexFromLocal
void SetGlobalIndexFromLocal(vtkIdType index)
JB.
vtkHyperTree
A data object structured as a tree.
Definition: vtkHyperTree.h:179
vtkHyperTreeGridNonOrientedSuperCursor::ChildCursorToParentCursorTable
const unsigned int * ChildCursorToParentCursorTable
Definition: vtkHyperTreeGridNonOrientedSuperCursor.h:298
vtkHyperTreeGridNonOrientedSuperCursor::GetPoint
void GetPoint(double point[3])
JB Coordonnees du centre de la maille.
vtkHyperTreeGridNonOrientedSuperCursor::CurrentFirstNonValidEntryByLevel
unsigned int CurrentFirstNonValidEntryByLevel
JB Hyper tree grid to which the cursor is attached.
Definition: vtkHyperTreeGridNonOrientedSuperCursor.h:267
vtkHyperTreeGridNonOrientedSuperCursor::GetVertexId
vtkIdType GetVertexId(unsigned int icursor)
vtkObject.h
vtkHyperTreeGridNonOrientedSuperCursor::GetNumberOfCursors
unsigned int GetNumberOfCursors()
JB.
Definition: vtkHyperTreeGridNonOrientedSuperCursor.h:224
vtkHyperTreeGridGeometryLevelEntry.h
vtkHyperTreeGridNonOrientedSuperCursor::vtkHyperTreeGridNonOrientedSuperCursor
vtkHyperTreeGridNonOrientedSuperCursor()
Constructor.
vtkHyperTreeGridNonOrientedSuperCursor::ToRoot
void ToRoot()
Move the cursor to the root vertex.
vtkHyperTreeGridNonOrientedSuperCursor::GetTree
vtkHyperTree * GetTree()
Set the hyper tree to which the cursor is pointing.
vtkHyperTreeGridNonOrientedSuperCursor::GetInformation
vtkHyperTree * GetInformation(unsigned int icursor, unsigned int &level, bool &leaf, vtkIdType &id)
JB.
vtkHyperTreeGridNonOrientedSuperCursor::GetSize
double * GetSize()
vtkHyperTreeGridNonOrientedSuperCursor::HasTree
bool HasTree(unsigned int icursor)
JB Return if a Tree pointing exist.
vtkX3D::index
@ index
Definition: vtkX3D.h:252
vtkHyperTreeGridNonOrientedSuperCursor::GetNonOrientedGeometryCursor
vtkSmartPointer< vtkHyperTreeGridNonOrientedGeometryCursor > GetNonOrientedGeometryCursor(unsigned int icursor)
Return the cursor pointing into i-th neighbor.
vtkHyperTreeGridNonOrientedSuperCursor::GetDimension
unsigned char GetDimension()
Return the dimension of the tree.
vtkHyperTreeGridNonOrientedSuperCursor::ToChild
void ToChild(unsigned char ichild)
Move the cursor to child ‘child’ of the current vertex.
vtkHyperTreeGridNonOrientedSuperCursor::SetGlobalIndexStart
void SetGlobalIndexStart(vtkIdType index)
JB.
vtkHyperTreeGridNonOrientedSuperCursor::ReferenceEntries
std::vector< unsigned int > ReferenceEntries
Definition: vtkHyperTreeGridNonOrientedSuperCursor.h:276
vtkHyperTreeGrid
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
Definition: vtkHyperTreeGrid.h:97