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 
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 
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
vtkHyperTreeGridOrientedGeometryCursor::HasTree
bool HasTree() const
Return if a Tree pointing exist.
Definition: vtkHyperTreeGridOrientedGeometryCursor.h:95
vtkHyperTreeGridOrientedGeometryCursor::Level
unsigned int Level
JB.
Definition: vtkHyperTreeGridOrientedGeometryCursor.h:221
vtkHyperTreeGridOrientedGeometryCursor::Clone
virtual vtkHyperTreeGridOrientedGeometryCursor * Clone()
Create a copy of ‘this’.
vtkHyperTreeGridOrientedGeometryCursor::GetSize
double * GetSize()
vtkHyperTreeGridOrientedGeometryCursor::IsLeaf
bool IsLeaf()
Is the cursor pointing to a leaf?
vtkHyperTreeGridOrientedGeometryCursor::Tree
vtkHyperTree * Tree
JB.
Definition: vtkHyperTreeGridOrientedGeometryCursor.h:211
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkHyperTreeGridOrientedGeometryCursor::GetDimension
unsigned char GetDimension()
Return the dimension of the tree.
vtkHyperTreeGridOrientedGeometryCursor::~vtkHyperTreeGridOrientedGeometryCursor
~vtkHyperTreeGridOrientedGeometryCursor() override
Destructor JB Just pour vtkHyperTreeGridNonOrientedVonNeumannSuperCursor et Moore.
vtkHyperTreeGridOrientedGeometryCursor::SubdivideLeaf
void SubdivideLeaf()
JB Fait chier normalement on devrait passer par GetEntry.
vtkHyperTreeGridTools.h
vtkHyperTreeGridOrientedGeometryCursor::SetGlobalIndexStart
void SetGlobalIndexStart(vtkIdType index)
JB.
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:54
vtkHyperTreeGridGeometryEntry
JB.
Definition: vtkHyperTreeGridGeometryEntry.h:49
vtkHyperTreeGridOrientedGeometryCursor::Scales
std::shared_ptr< vtkHyperTreeGridScales > Scales
JB Storage of pre-computed per-level cell scales.
Definition: vtkHyperTreeGridOrientedGeometryCursor.h:216
vtkHyperTreeGridOrientedGeometryCursor::Entry
vtkHyperTreeGridGeometryEntry Entry
Definition: vtkHyperTreeGridOrientedGeometryCursor.h:224
vtk::hypertreegrid::HasTree
bool HasTree(const T &e)
Definition: vtkHyperTreeGridTools.h:25
vtkHyperTreeGridScales
A specifalized type of vtkHyperTreeGrid for the case when root cells have uniform sizes in each direc...
Definition: vtkHyperTreeGridScales.h:35
vtkHyperTreeGridOrientedGeometryCursor::New
static vtkHyperTreeGridOrientedGeometryCursor * New()
vtkHyperTreeGridOrientedGeometryCursor::SetGlobalIndexFromLocal
void SetGlobalIndexFromLocal(vtkIdType index)
JB.
vtkX3D::level
@ level
Definition: vtkX3D.h:401
vtkHyperTreeGridOrientedGeometryCursor::GetBounds
void GetBounds(double bounds[6])
JB.
vtkX3D::point
@ point
Definition: vtkX3D.h:242
vtkHyperTreeGridOrientedGeometryCursor::GetLevel
unsigned int GetLevel()
Get the level of the tree vertex pointed by the cursor.
vtkHyperTreeGridOrientedGeometryCursor::GetVertexId
vtkIdType GetVertexId()
Return the index of the current vertex in the tree.
vtkHyperTreeGridOrientedGeometryCursor::IsMasked
bool IsMasked()
Determine whether blanking mask is empty or not.
vtkHyperTreeGridOrientedGeometryCursor::GetGlobalNodeIndex
vtkIdType GetGlobalNodeIndex()
Return the global index (relative to the grid) of the current vertex in the tree.
vtkHyperTreeGridOrientedGeometryCursor::Initialize
void Initialize(vtkHyperTreeGridOrientedGeometryCursor *cursor)
JB.
vtkHyperTreeGridOrientedGeometryCursor::Dump
void Dump(ostream &os)
vtkHyperTreeGridOrientedGeometryCursor
Objects for traversal a HyperTreeGrid.
Definition: vtkHyperTreeGridOrientedGeometryCursor.h:55
vtkHyperTreeGridOrientedGeometryCursor::Grid
vtkHyperTreeGrid * Grid
JB Reference sur l'hyper tree grid parcouru actuellement.
Definition: vtkHyperTreeGridOrientedGeometryCursor.h:206
vtkHyperTreeGridOrientedGeometryCursor::SetMask
void SetMask(bool state)
Set the blanking mask is empty or not.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkHyperTreeGridOrientedGeometryCursor::GetTree
vtkHyperTree * GetTree() const
Set the hyper tree to which the cursor is pointing.
Definition: vtkHyperTreeGridOrientedGeometryCursor.h:102
vtkHyperTree
A data object structured as a tree.
Definition: vtkHyperTree.h:179
vtkHyperTreeGridOrientedGeometryCursor::Initialize
void Initialize(vtkHyperTreeGrid *grid, vtkHyperTree *tree, unsigned int level, vtkHyperTreeGridGeometryEntry &entry)
Initialize cursor at root of given tree index in grid.
vtkObject.h
vtkHyperTreeGridOrientedGeometryCursor::GetPoint
void GetPoint(double point[3])
vtkHyperTreeGridGeometryEntry.h
vtkHyperTreeGridOrientedGeometryCursor::GetNumberOfChildren
unsigned char GetNumberOfChildren()
Return the number of children for each node (non-vertex leaf) of the tree.
vtkHyperTreeGridOrientedGeometryCursor::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkHyperTreeGridOrientedGeometryCursor::Initialize
void Initialize(vtkHyperTreeGrid *grid, vtkIdType treeIndex, bool create=false)
Initialize cursor at root of given tree index in grid.
vtkHyperTreeGridOrientedGeometryCursor::IsRoot
bool IsRoot()
Is the cursor at tree root?
vtkHyperTreeGridOrientedGeometryCursor::GetOrigin
double * GetOrigin()
JB.
vtkX3D::index
@ index
Definition: vtkX3D.h:252
vtkHyperTreeGridOrientedGeometryCursor::ToChild
void ToChild(unsigned char ichild)
Move the cursor to child ‘child’ of the current vertex.
vtkHyperTreeGridOrientedGeometryCursor::Initialize
void Initialize(vtkHyperTreeGrid *grid, vtkHyperTree *tree, unsigned int level, vtkIdType index, double *origin)
JB.
vtkHyperTreeGrid
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
Definition: vtkHyperTreeGrid.h:97
vtkHyperTreeGridOrientedGeometryCursor::vtkHyperTreeGridOrientedGeometryCursor
vtkHyperTreeGridOrientedGeometryCursor()
Constructor JB Just pour vtkHyperTreeGridNonOrientedVonNeumannSuperCursor et Moore.