VTK  9.1.0
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
50class vtkHyperTree;
53
54class VTKCOMMONDATAMODEL_EXPORT vtkHyperTreeGridOrientedGeometryCursor : public vtkObject
55{
56public:
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
90
92
95 bool HasTree() const { return vtk::hypertreegrid::HasTree(*this); }
97
99
102 vtkHyperTree* GetTree() const { return this->Tree; }
104
109
115
120 unsigned char GetDimension();
121
126 unsigned char GetNumberOfChildren();
127
132
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
170
174 bool IsRoot();
175
179 unsigned int GetLevel();
180
188 void ToChild(unsigned char ichild);
189
190protected:
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
226private:
228 void operator=(const vtkHyperTreeGridOrientedGeometryCursor&) = delete;
229};
230#endif
bool HasTree() const
Return if a Tree pointing exist.
void SetGlobalIndexFromLocal(vtkIdType index)
JB.
void GetBounds(double bounds[6])
JB.
void ToChild(unsigned char ichild)
Move the cursor to child ‘child’ of the current vertex.
virtual vtkHyperTreeGridOrientedGeometryCursor * Clone()
Create a copy of ‘this’.
~vtkHyperTreeGridOrientedGeometryCursor() override
Destructor JB Just pour vtkHyperTreeGridNonOrientedVonNeumannSuperCursor et Moore.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetGlobalIndexStart(vtkIdType index)
JB.
vtkIdType GetVertexId()
Return the index of the current vertex in the tree.
unsigned char GetDimension()
Return the dimension of the tree.
void SubdivideLeaf()
JB Fait chier normalement on devrait passer par GetEntry.
unsigned int GetLevel()
Get the level of the tree vertex pointed by the cursor.
bool IsLeaf()
Is the cursor pointing to a leaf?
void Initialize(vtkHyperTreeGrid *grid, vtkHyperTree *tree, unsigned int level, vtkIdType index, double *origin)
JB.
vtkHyperTreeGrid * Grid
JB Reference sur l'hyper tree grid parcouru actuellement.
void SetMask(bool state)
Set the blanking mask is empty or not.
void Initialize(vtkHyperTreeGridOrientedGeometryCursor *cursor)
JB.
bool IsMasked()
Determine whether blanking mask is empty or not.
void Initialize(vtkHyperTreeGrid *grid, vtkIdType treeIndex, bool create=false)
Initialize cursor at root of given tree index in grid.
bool IsRoot()
Is the cursor at tree root?
vtkHyperTreeGridOrientedGeometryCursor()
Constructor JB Just pour vtkHyperTreeGridNonOrientedVonNeumannSuperCursor et Moore.
vtkIdType GetGlobalNodeIndex()
Return the global index (relative to the grid) of the current vertex in the tree.
std::shared_ptr< vtkHyperTreeGridScales > Scales
JB Storage of pre-computed per-level cell scales.
static vtkHyperTreeGridOrientedGeometryCursor * New()
void Initialize(vtkHyperTreeGrid *grid, vtkHyperTree *tree, unsigned int level, vtkHyperTreeGridGeometryEntry &entry)
Initialize cursor at root of given tree index in grid.
vtkHyperTree * GetTree() const
Set the hyper tree to which the cursor is pointing.
unsigned char GetNumberOfChildren()
Return the number of children for each node (non-vertex leaf) of the tree.
A specifalized type of vtkHyperTreeGrid for the case when root cells have uniform sizes in each direc...
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
A data object structured as a tree.
Definition: vtkHyperTree.h:177
a simple class to control print indentation
Definition: vtkIndent.h:113
abstract base class for most VTK objects
Definition: vtkObject.h:73
@ point
Definition: vtkX3D.h:242
@ level
Definition: vtkX3D.h:401
@ index
Definition: vtkX3D.h:252
bool HasTree(const T &e)
int vtkIdType
Definition: vtkType.h:332