VTK  9.3.0
vtkHyperTreeGridOrientedGeometryCursor.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
27#ifndef vtkHyperTreeGridOrientedGeometryCursor_h
28#define vtkHyperTreeGridOrientedGeometryCursor_h
29
30#include "vtkCommonDataModelModule.h" // For export macro
31#include "vtkHyperTreeGridGeometryEntry.h" // Used internally
32#include "vtkHyperTreeGridTools.h" // for HasTree
33#include "vtkObject.h"
34
35#include <memory> // For std::shared_ptr
36#include <vector> // For std::vector
37
38VTK_ABI_NAMESPACE_BEGIN
39class vtkHyperTree;
42
43class VTKCOMMONDATAMODEL_EXPORT vtkHyperTreeGridOrientedGeometryCursor : public vtkObject
44{
45public:
47 void PrintSelf(ostream& os, vtkIndent indent) override;
49
50 void Dump(ostream& os);
51
57
61 void Initialize(vtkHyperTreeGrid* grid, vtkIdType treeIndex, bool create = false);
62
66 void Initialize(vtkHyperTreeGrid* grid, vtkHyperTree* tree, unsigned int level,
68
72 void Initialize(vtkHyperTreeGrid* grid, vtkHyperTree* tree, unsigned int level, vtkIdType index,
73 double* origin);
74
79
81
84 bool HasTree() const { return vtk::hypertreegrid::HasTree(*this); }
86
88
91 vtkHyperTree* GetTree() const { return this->Tree; }
93
98
104
109 unsigned char GetDimension();
110
115 unsigned char GetNumberOfChildren();
116
121
126
130 double* GetOrigin();
131 double* GetSize();
132
136 void GetBounds(double bounds[6]);
137 void GetPoint(double point[3]);
138
143 void SetMask(bool state);
144
148 bool IsMasked();
149
153 bool IsLeaf();
154
159
163 bool IsRoot();
164
168 unsigned int GetLevel();
169
177 void ToChild(unsigned char ichild);
178
179protected:
185
191
196
201
205 std::shared_ptr<vtkHyperTreeGridScales> Scales;
206
210 unsigned int Level;
211
212 // Hyper tree grid to which the cursor is attached
214
215private:
217 void operator=(const vtkHyperTreeGridOrientedGeometryCursor&) = delete;
218};
219VTK_ABI_NAMESPACE_END
220#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.
a simple class to control print indentation
Definition vtkIndent.h:29
abstract base class for most VTK objects
Definition vtkObject.h:49
int vtkIdType
Definition vtkType.h:315