VTK
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 "vtkObject.h"
43 #include "vtkCommonDataModelModule.h" // For export macro
44 #include "vtkHyperTreeGridGeometryEntry.h" // Used internally
45 #include "vtkHyperTreeGridTools.h" // for HasTree
46 
47 #include <vector> // For std::vector
48 #include <memory> // For std::shared_ptr
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(
78  vtkHyperTreeGrid* grid,
79  vtkHyperTree* tree,
80  unsigned int level,
82 
86  void Initialize(
87  vtkHyperTreeGrid* grid,
88  vtkHyperTree* tree,
89  unsigned int level,
91  double* origin
92  );
93 
97  void Initialize( vtkHyperTreeGridOrientedGeometryCursor* cursor );
98 
100 
103  bool HasTree() const { return vtk::hypertreegrid::HasTree( *this ); }
105 
107 
110  vtkHyperTree* GetTree() const { return this->Tree; }
112 
116  vtkIdType GetVertexId();
117 
122  vtkIdType GetGlobalNodeIndex();
123 
128  unsigned char GetDimension();
129 
134  unsigned char GetNumberOfChildren();
135 
139  void SetGlobalIndexStart( vtkIdType index );
140 
144  void SetGlobalIndexFromLocal( vtkIdType index );
145 
149  double* GetOrigin();
150  double* GetSize();
151 
155  void GetBounds( double bounds[6] );
156  void GetPoint( double point[3] );
157 
162  void SetMask( bool state ) ;
163 
167  bool IsMasked();
168 
172  bool IsLeaf();
173 
177  void SubdivideLeaf();
178 
182  bool IsRoot();
183 
187  unsigned int GetLevel();
188 
196  void ToChild( unsigned char ichild );
197 
198 protected:
199 
205 
211 
216 
221 
225  std::shared_ptr<vtkHyperTreeGridScales> Scales;
226 
230  unsigned int Level;
231 
232  // Hyper tree grid to which the cursor is attached
234 
235 private:
237  void operator=(const vtkHyperTreeGridOrientedGeometryCursor&) = delete;
238 };
239 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:59
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.
vtkHyperTree * GetTree() const
Set the hyper tree to which the cursor is pointing.
int vtkIdType
Definition: vtkType.h:349
bool HasTree() const
Return if a Tree pointing exist.
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])
a simple class to control print indentation
Definition: vtkIndent.h:39
std::shared_ptr< vtkHyperTreeGridScales > Scales
JB Storage of pre-computed per-level cell scales.
An object structured as a tree where each node has exactly either 2^d or 3^d children.
Definition: vtkHyperTree.h:166
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...