Section: Visualization Toolkit Filtering Classes
To create an instance of class vtkHyperOctreeCursor, simply invoke its constructor as follows
obj = vtkHyperOctreeCursor
obj
is an instance of the vtkHyperOctreeCursor class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkHyperOctreeCursor = obj.NewInstance ()
vtkHyperOctreeCursor = obj.SafeDownCast (vtkObject o)
int = obj.GetLeafId ()
- Return the index of the current leaf in the data arrays.
\pre is_leaf: CurrentIsLeaf()
int = obj.CurrentIsLeaf ()
- Is the node pointed by the cursor a leaf?
int = obj.CurrentIsRoot ()
- Is the node pointed by the cursor the root?
int = obj.GetCurrentLevel ()
- Return the level of the node pointed by the cursor.
\post positive_result: result>=0
int = obj.GetChildIndex ()
- Return the child number of the current node relative to its parent.
\pre not_root: !CurrentIsRoot().
\post valid_range: result>=0 && result<GetNumberOfChildren()
int = obj.CurrentIsTerminalNode ()
obj.ToRoot ()
- Move the cursor the root node.
\pre can be root
\post is_root: CurrentIsRoot()
obj.ToParent ()
- Move the cursor to the parent of the current node.
\pre not_root: !CurrentIsRoot()
obj.ToChild (int child)
- Move the cursor to child `child' of the current node.
\pre not_leaf: !CurrentIsLeaf()
\pre valid_child: child>=0 && child<this->GetNumberOfChildren()
obj.ToSameNode (vtkHyperOctreeCursor other)
- Move the cursor to the same node pointed by `other'.
\pre other_exists: other!=0
\pre same_hyperoctree: this->SameTree(other);
\post equal: this->IsEqual(other)
int = obj.IsEqual (vtkHyperOctreeCursor other)
- Is `this' equal to `other'?
\pre other_exists: other!=0
\pre same_hyperoctree: this->SameTree(other);
vtkHyperOctreeCursor = obj.Clone ()
- Create a copy of `this'.
\post results_exists:result!=0
\post same_tree: result->SameTree(this)
int = obj.SameTree (vtkHyperOctreeCursor other)
- Are `this' and `other' pointing on the same hyperoctree?
\pre other_exists: other!=0
int = obj.GetIndex (int d)
- Return the index in dimension `d', as if the node was a cell of a
uniform grid of 1<<GetCurrentLevel() cells in each dimension.
\pre valid_range: d>=0 && d<GetDimension()
\post valid_result: result>=0 && result<(1<<GetCurrentLevel())
int = obj.GetNumberOfChildren ()
- Return the number of children for each node of the tree.
\post positive_number: result>0
int = obj.GetDimension ()
- Return the dimension of the tree.
\post positive_result: result>0
obj.MoveToNode (int indices, int level)
- Move to the node described by its indices in each dimension and
at a given level. If there is actually a node or a leaf at this
location, Found() returns true. Otherwise, Found() returns false and the
cursor moves to the closest parent of the query. It can be the root in the
worst case.
\pre indices_exists: indices!=0
\pre valid_size: sizeof(indices)==GetDimension()
\pre valid_level: level>=0
int = obj.Found ()