VTK
vtkHyperTree.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkHyperTree.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 notice for more information.
13 
14 =========================================================================*/
134 #ifndef vtkHyperTree_h
135 #define vtkHyperTree_h
136 
137 #include "vtkCommonDataModelModule.h" // For export macro
138 #include "vtkObject.h"
139 
140 class vtkHyperTreeCursor;
141 
142 class VTKCOMMONDATAMODEL_EXPORT vtkHyperTree : public vtkObject
143 {
144 public:
145  vtkTypeMacro(vtkHyperTree, vtkObject);
146  void PrintSelf( ostream&, vtkIndent ) override;
147 
151  virtual void Initialize() = 0;
152 
157 
162 
167 
172 
176  virtual int GetBranchFactor() = 0;
177 
181  virtual int GetDimension() = 0;
182 
187 
189 
192  virtual void SetScale( double[3] ) = 0;
193  virtual void GetScale( double[3] ) = 0;
194  virtual double GetScale( unsigned int ) = 0;
196 
203  static vtkHyperTree* CreateInstance( unsigned int branchFactor,
204  unsigned int dimension );
205 
210  virtual void FindParentIndex( vtkIdType& );
211 
217  virtual void FindChildParameters( int, vtkIdType&, bool& );
218 
223 
230  virtual void SubdivideLeaf( vtkHyperTreeCursor* leaf ) = 0;
231 
236  virtual unsigned int GetActualMemorySize() = 0;
237 
242  virtual void SetGlobalIndexStart( vtkIdType ) = 0;
243 
247  virtual void SetGlobalIndexFromLocal( vtkIdType local, vtkIdType global ) = 0;
248 
254 
255 protected:
257  {
258  }
259 
260 private:
261  vtkHyperTree(const vtkHyperTree&) = delete;
262  void operator=(const vtkHyperTree&) = delete;
263 };
264 
265 #endif
vtkHyperTree::vtkHyperTree
vtkHyperTree()
Definition: vtkHyperTree.h:256
global
Definition: UnstructuredGhostZonesCommon.h:31
vtkHyperTree::GetActualMemorySize
virtual unsigned int GetActualMemorySize()=0
Return memory used in kibibytes (1024 bytes).
vtkHyperTree::FindChildParameters
virtual void FindChildParameters(int, vtkIdType &, bool &)
Find the Index, Parent Index and IsLeaf() parameters of the child of a node in the hypertree.
vtkHyperTree::GetDimension
virtual int GetDimension()=0
Return the dimension of the tree.
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:60
vtkHyperTree::SubdivideLeaf
virtual void SubdivideLeaf(vtkHyperTreeCursor *leaf)=0
Subdivide node pointed by cursor, only if its a leaf.
vtkHyperTree::SetGlobalIndexStart
virtual void SetGlobalIndexStart(vtkIdType)=0
Set the start global index for the current tree.
vtkHyperTree::GetBranchFactor
virtual int GetBranchFactor()=0
Return the branch factor of the tree.
vtkHyperTree::NewCursor
virtual vtkHyperTreeCursor * NewCursor()=0
Return pointer to new instance of hyper tree cursor.
vtkHyperTree::SetGlobalIndexFromLocal
virtual void SetGlobalIndexFromLocal(vtkIdType local, vtkIdType global)=0
Set the mapping between local & global Ids used by HyperTreeGrids.
vtkHyperTree::GetNumberOfChildren
virtual vtkIdType GetNumberOfChildren()=0
Return the number of children per node of the tree.
vtkHyperTree::GetScale
virtual void GetScale(double[3])=0
vtkHyperTree::GetNumberOfNodes
virtual vtkIdType GetNumberOfNodes()=0
Return the number of nodes (non-leaf vertices) in the tree.
vtkHyperTree::PrintSelf
void PrintSelf(ostream &, vtkIndent) override
Methods invoked by print to print information about the object including superclasses.
vtkHyperTreeCursor
Objects for depth-first traversal HyperTrees.
Definition: vtkHyperTreeCursor.h:43
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkHyperTree::GetGlobalIndexFromLocal
virtual vtkIdType GetGlobalIndexFromLocal(vtkIdType local)=0
Get the global id of a local node.
vtkHyperTree
An object structured as a tree where each node has exactly either 2^d or 3^d children.
Definition: vtkHyperTree.h:143
vtkHyperTree::GetNumberOfVertices
virtual vtkIdType GetNumberOfVertices()=0
Return the number of vertices in the tree.
vtkObject.h
vtkHyperTree::SetScale
virtual void SetScale(double[3])=0
Set/Get scale of the tree in each direction.
vtkHyperTree::GetScale
virtual double GetScale(unsigned int)=0
vtkHyperTree::CreateInstance
static vtkHyperTree * CreateInstance(unsigned int branchFactor, unsigned int dimension)
Return an instance of a templated hypertree for given branch factor and dimension.
vtkHyperTree::GetNumberOfLeaves
virtual vtkIdType GetNumberOfLeaves()=0
Return the number of leaf vertices in the tree.
vtkHyperTree::FindParentIndex
virtual void FindParentIndex(vtkIdType &)
Find the Index of the parent of a vertex in the hypertree.
vtkHyperTree::GetNumberOfLevels
virtual vtkIdType GetNumberOfLevels()=0
Return the number of levels.
VTK_NEWINSTANCE
#define VTK_NEWINSTANCE
Definition: vtkWrappingHints.h:39
vtkHyperTree::Initialize
virtual void Initialize()=0
Restore the initial state: only one node and one leaf: the root.