VTK  9.0.1
vtkHyperTreeGridOrientedGeometryCursor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkHyperTreeGridOrientedGeometryCursor.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 =========================================================================*/
39 #ifndef vtkHyperTreeGridOrientedGeometryCursor_h
40 #define vtkHyperTreeGridOrientedGeometryCursor_h
41 
42 #include "vtkCommonDataModelModule.h" // For export macro
43 #include "vtkHyperTreeGridGeometryEntry.h" // Used internally
44 #include "vtkHyperTreeGridTools.h" // for HasTree
45 #include "vtkObject.h"
46 
47 #include <memory> // For std::shared_ptr
48 #include <vector> // For std::vector
49 
50 class vtkHyperTree;
51 class vtkHyperTreeGrid;
53 
54 class VTKCOMMONDATAMODEL_EXPORT vtkHyperTreeGridOrientedGeometryCursor : public vtkObject
55 {
56 public:
58  void PrintSelf(ostream& os, vtkIndent indent) override;
60 
61  void Dump(ostream& os);
62 
68 
72  void Initialize(vtkHyperTreeGrid* grid, vtkIdType treeIndex, bool create = false);
73 
77  void Initialize(vtkHyperTreeGrid* grid, vtkHyperTree* tree, unsigned int level,
79 
83  void Initialize(vtkHyperTreeGrid* grid, vtkHyperTree* tree, unsigned int level, vtkIdType index,
84  double* origin);
85 
89  void Initialize(vtkHyperTreeGridOrientedGeometryCursor* cursor);
90 
92 
95  bool HasTree() const { return vtk::hypertreegrid::HasTree(*this); }
97 
99 
102  vtkHyperTree* GetTree() const { return this->Tree; }
104 
108  vtkIdType GetVertexId();
109 
114  vtkIdType GetGlobalNodeIndex();
115 
120  unsigned char GetDimension();
121 
126  unsigned char GetNumberOfChildren();
127 
131  void SetGlobalIndexStart(vtkIdType index);
132 
136  void SetGlobalIndexFromLocal(vtkIdType index);
137 
141  double* GetOrigin();
142  double* GetSize();
143 
147  void GetBounds(double bounds[6]);
148  void GetPoint(double point[3]);
149 
154  void SetMask(bool state);
155 
159  bool IsMasked();
160 
164  bool IsLeaf();
165 
169  void SubdivideLeaf();
170 
174  bool IsRoot();
175 
179  unsigned int GetLevel();
180 
188  void ToChild(unsigned char ichild);
189 
190 protected:
196 
202 
207 
212 
216  std::shared_ptr<vtkHyperTreeGridScales> Scales;
217 
221  unsigned int Level;
222 
223  // Hyper tree grid to which the cursor is attached
225 
226 private:
228  void operator=(const vtkHyperTreeGridOrientedGeometryCursor&) = delete;
229 };
230 #endif
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.
bool HasTree() const
Return if a Tree pointing exist.
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
int vtkIdType
Definition: vtkType.h:338
vtkHyperTreeGrid * Grid
JB Reference sur l&#39;hyper tree grid parcouru actuellement.
void GetPoint(const int i, const int j, const int k, double pnt[3])
vtkHyperTree * GetTree() const
Set the hyper tree to which the cursor is pointing.
a simple class to control print indentation
Definition: vtkIndent.h:33
std::shared_ptr< vtkHyperTreeGridScales > Scales
JB Storage of pre-computed per-level cell scales.
A data object structured as a tree.
Definition: vtkHyperTree.h:178
A specifalized type of vtkHyperTreeGrid for the case when root cells have uniform sizes in each direc...
bool HasTree(const T &e)
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...