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 
76  vtkHyperTreeGrid* GetGrid();
78 
80 
83  bool HasTree();
85 
89  bool HasTree(unsigned int icursor);
90 
92 
95  vtkHyperTree* GetTree();
96  vtkHyperTree* GetTree(unsigned int icursor);
98 
102  vtkIdType GetVertexId();
103  vtkIdType GetVertexId(unsigned int icursor);
104 
109  vtkIdType GetGlobalNodeIndex();
110 
115  vtkIdType GetGlobalNodeIndex(unsigned int icursor);
116 
120  vtkHyperTree* GetInformation(
121  unsigned int icursor, unsigned int& level, bool& leaf, vtkIdType& id);
122 
127  unsigned char GetDimension();
128 
133  unsigned char GetNumberOfChildren();
134 
138  void SetGlobalIndexStart(vtkIdType index);
139 
143  void SetGlobalIndexFromLocal(vtkIdType index);
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 
185  void SubdivideLeaf();
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
vtkHyperTreeGrid * Grid
JB Reference sur l&#39;hyper tree grid parcouru actuellement.
abstract base class for most VTK objects
Definition: vtkObject.h:62
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.
std::vector< vtkHyperTreeGridGeometryLevelEntry > Entries
Hold a reference to a vtkObjectBase instance.
Definition: vtkMeta.h:32
int vtkIdType
Definition: vtkType.h:338
void GetPoint(const int i, const int j, const int k, double pnt[3])
unsigned int FirstCurrentNeighboorReferenceEntry
JB La derniere reference valide pour decrire tous les voisins.
vtkSmartPointer< vtkHyperTreeGridNonOrientedGeometryCursor > CentralCursor
JB.
a simple class to control print indentation
Definition: vtkIndent.h:33
A data object structured as a tree.
Definition: vtkHyperTree.h:178
bool HasTree(const T &e)
unsigned int CurrentFirstNonValidEntryByLevel
JB Hyper tree grid to which the cursor is attached.