VTK
|
An object structured as a tree where each node has exactly either 2^n or 3^n children. More...
#include <vtkHyperTree.h>
Public Types | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkHyperTree * | NewInstance () const |
virtual void | Initialize ()=0 |
virtual vtkHyperTreeCursor * | NewCursor ()=0 |
virtual vtkIdType | GetNumberOfLeaves ()=0 |
virtual vtkIdType | GetNumberOfNodes ()=0 |
virtual vtkIdType | GetNumberOfIndex ()=0 |
virtual int | GetBranchFactor ()=0 |
virtual int | GetDimension ()=0 |
virtual void | SetScale (double[3])=0 |
virtual void | GetScale (double[3])=0 |
virtual double | GetScale (unsigned int)=0 |
virtual vtkIdType | GetNumberOfLevels ()=0 |
virtual void | SubdivideLeaf (vtkHyperTreeCursor *leaf)=0 |
virtual unsigned int | GetActualMemorySize ()=0 |
virtual void | FindChildParameters (int, vtkIdType &, bool &) |
virtual void | SetGlobalIndexStart (vtkIdType)=0 |
virtual void | SetGlobalIndexFromLocal (vtkIdType local, vtkIdType global)=0 |
virtual vtkIdType | GetGlobalIndexFromLocal (vtkIdType local)=0 |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkHyperTree * | SafeDownCast (vtkObjectBase *o) |
static vtkHyperTree * | CreateInstance (unsigned int branchFactor, unsigned int dimension) |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkHyperTree () |
An object structured as a tree where each node has exactly either 2^n or 3^n children.
An hypertree is a dataset where each node has either exactly 2^n or 3^n children or no child at all if the node is a leaf. `n' is the dimension of the dataset (1 (binary tree), 2 (quadtree) or 3 (octree) ). The class name comes from the following paper:
@ARTICLE{yau-srihari-1983, author={Mann-May Yau and Sargur N. Srihari}, title={A Hierarchical Data Structure for Multidimensional Digital Images}, journal={Communications of the ACM}, month={July}, year={1983}, volume={26}, number={7}, pages={504--515} }
Each node is a cell. Attributes are associated with cells, not with points. The geometry is implicitly given by the size of the root node on each axis and position of the center and the orientation. (TODO: review center position and orientation). The geometry is then not limited to an hybercube but can have a rectangular shape. Attributes are associated with leaves. For LOD (Level-Of-Detail) purpose, attributes can be computed on none-leaf nodes by computing the average values from its children (which can be leaves or not).
By construction, an hypertree is efficient in memory usage when the geometry is sparse. The LOD feature allows to cull quickly part of the dataset.
This is an abstract class used as a superclass by a templated compact class. All methods are pure virtual. This is done to hide templates.
+y +-+-+ ^ |2|3| | +-+-+ O +z +-> +x |0|1| +-+-+
+y +-+-+ ^ |6|7| | +-+-+ O +z +-> +x |4|5| +-+-+
+y +-+-+ ^ |2|3| | +-+-+ O+-> +x |0|1| +-+-+
+0+1+ O+-> +x
Definition at line 133 of file vtkHyperTree.h.
typedef vtkObject vtkHyperTree::Superclass |
Reimplemented from vtkObject.
Definition at line 136 of file vtkHyperTree.h.
vtkHyperTree::vtkHyperTree | ( | ) | [inline, protected] |
Definition at line 184 of file vtkHyperTree.h.
static int vtkHyperTree::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkObject.
virtual int vtkHyperTree::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkObject.
static vtkHyperTree* vtkHyperTree::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkObject.
virtual vtkObjectBase* vtkHyperTree::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkObject.
vtkHyperTree* vtkHyperTree::NewInstance | ( | ) | const |
Reimplemented from vtkObject.
virtual void vtkHyperTree::Initialize | ( | ) | [pure virtual] |
virtual vtkHyperTreeCursor* vtkHyperTree::NewCursor | ( | ) | [pure virtual] |
virtual vtkIdType vtkHyperTree::GetNumberOfLeaves | ( | ) | [pure virtual] |
virtual vtkIdType vtkHyperTree::GetNumberOfNodes | ( | ) | [pure virtual] |
virtual vtkIdType vtkHyperTree::GetNumberOfIndex | ( | ) | [pure virtual] |
virtual int vtkHyperTree::GetBranchFactor | ( | ) | [pure virtual] |
virtual int vtkHyperTree::GetDimension | ( | ) | [pure virtual] |
virtual void vtkHyperTree::SetScale | ( | double | [3] | ) | [pure virtual] |
virtual void vtkHyperTree::GetScale | ( | double | [3] | ) | [pure virtual] |
virtual double vtkHyperTree::GetScale | ( | unsigned | int | ) | [pure virtual] |
virtual vtkIdType vtkHyperTree::GetNumberOfLevels | ( | ) | [pure virtual] |
Return the number of levels.
virtual void vtkHyperTree::SubdivideLeaf | ( | vtkHyperTreeCursor * | leaf | ) | [pure virtual] |
Subdivide node pointed by cursor, only if its a leaf. At the end, cursor points on the node that used to be leaf.
virtual unsigned int vtkHyperTree::GetActualMemorySize | ( | ) | [pure virtual] |
Return the actual memory size in kilobytes. NB: Ignores the attribute array.
static vtkHyperTree* vtkHyperTree::CreateInstance | ( | unsigned int | branchFactor, |
unsigned int | dimension | ||
) | [static] |
Return an instance of a templated hypertree for given branch factor and dimension This is done to hide templates.
virtual void vtkHyperTree::FindChildParameters | ( | int | , |
vtkIdType & | , | ||
bool & | |||
) | [virtual] |
Find the Index, Parent Index and IsLeaf() parameters of a child for hypertree. This is done to hide templates.
virtual void vtkHyperTree::SetGlobalIndexStart | ( | vtkIdType | ) | [pure virtual] |
Set the start global index for the current tree. The global index of a node will be this index + the node index.
virtual void vtkHyperTree::SetGlobalIndexFromLocal | ( | vtkIdType | local, |
vtkIdType | global | ||
) | [pure virtual] |
Set the mapping between local & global ids used by HyperTreeGrids.
virtual vtkIdType vtkHyperTree::GetGlobalIndexFromLocal | ( | vtkIdType | local | ) | [pure virtual] |
Get the global id of a local node. Use the mapping function if available or the start global index.