36#ifndef vtkHyperTreeGridGeometryLevelEntry_h
37#define vtkHyperTreeGridGeometryLevelEntry_h
68 for (
unsigned int d = 0; d < 3; ++d)
92 for (
unsigned int d = 0; d < 3; ++d)
94 this->Origin[d] = origin[d];
108 this->Tree =
nullptr;
117 this->
Initialize(entry->Tree, entry->Level, entry->Index, entry->Origin);
129 cursor->Initialize(grid, this->Tree, this->Level, this->Index, this->Origin);
140 assert(
"pre: level==0" && this->Level == 0);
143 cursor->
Initialize(grid, this->Tree, this->Level, this->Index, this->Origin);
209 bool IsRoot() {
return (this->Index == 0); }
229 unsigned int GetLevel()
const {
return this->Level; }
235 const double*
GetOrigin()
const {
return this->Origin; }
Cursor cache data with coordinates and level info.
void SetMask(const vtkHyperTreeGrid *grid, bool state)
Set the blanking mask is empty or not.
bool IsLeaf(const vtkHyperTreeGrid *grid) const
Is the cursor pointing to a leaf?
bool IsTerminalNode(const vtkHyperTreeGrid *grid) const
Is the cursor pointing to a coarse with all childrens being leaves ?
void GetBounds(double bounds[6]) const
Getter for bounding box of the current cell.
vtkHyperTree * GetTree() const
Get HyperTree from current cache entry.
vtkHyperTreeGridGeometryLevelEntry()
Constructor.
vtkIdType GetVertexId() const
Return the index of the current vertex in the tree.
vtkIdType GetGlobalNodeIndex() const
Return the global index (relative to the grid) of the current vertex in the tree.
vtkSmartPointer< vtkHyperTreeGridNonOrientedGeometryCursor > GetHyperTreeGridNonOrientedGeometryCursor(vtkHyperTreeGrid *grid)
Create a vtkHyperTreeGridNonOrientedCursor from input grid and current entry data.
vtkSmartPointer< vtkHyperTreeGridOrientedGeometryCursor > GetHyperTreeGridOrientedGeometryCursor(vtkHyperTreeGrid *grid)
Create a vtkHyperTreeGridOrientedCursor from input grid and current entry data.
void Copy(const vtkHyperTreeGridGeometryLevelEntry *entry)
Copy function.
void Initialize(vtkHyperTree *tree, unsigned int level, vtkIdType index, const double *origin)
Initialize cache entry from explicit required data.
void Dump(ostream &os)
Dump information.
~vtkHyperTreeGridGeometryLevelEntry()=default
Destructor.
bool IsMasked(const vtkHyperTreeGrid *grid) const
Determine whether blanking mask is empty or not.
const double * GetOrigin() const
void SetGlobalIndexStart(vtkIdType index)
Set the global index for the root cell of the HyperTree.
vtkHyperTree * Initialize(vtkHyperTreeGrid *grid, vtkIdType treeIndex, bool create=false)
Initialize cache entry at root of given tree index in grid.
double * GetOrigin()
Getter for origin coordinates of the current cell.
bool IsRoot()
Is the cursor at tree root?
void Reset()
Reset function.
void GetPoint(double point[3]) const
Getter for center of the current cell.
void SetGlobalIndexFromLocal(vtkIdType index)
Set the global index for the current cell of the HyperTree.
void ToChild(const vtkHyperTreeGrid *grid, unsigned char ichild)
Move the cursor to child ‘child’ of the current vertex.
void SubdivideLeaf(const vtkHyperTreeGrid *grid)
Change the current cell's status: if leaf then becomes coarse and all its children are created,...
unsigned int GetLevel() const
Get level info from current cache entry.
void PrintSelf(ostream &os, vtkIndent indent)
Display info about the entry.
void Initialize(vtkHyperTreeGrid *grid, vtkIdType treeIndex, bool create=false)
Initialize cursor at root of given tree index in grid.
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
Hold a reference to a vtkObjectBase instance.
static vtkSmartPointer< T > New()
Create an instance of a VTK object.