| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/scenenodevisitor.h>

Public Types | |
| enum | TraversalFlag { Stop, Continue } |
Public Member Functions | |
| SceneNodeVisitor () | |
| VRS_SERIALIZABLE_CLASS_ENUM (TraversalFlag) | |
| virtual TraversalFlag | visitBehavior (SharedObj *obj) |
| virtual TraversalFlag | visitScene (SharedObj *obj, bool pushHint) |
| virtual void | pathPush (SharedObj *object) |
| virtual void | pathPop () |
| unsigned int | pathLength () const |
| SharedObj * | pathObject (unsigned int index) const |
| VRS_TYPEINFO (SceneNodeVisitor, SharedObj) | |
| VRS::SceneNodeVisitor::SceneNodeVisitor | ( | ) |
A visitor object is usually passed as parameter to the SceneNode::traverse methode of scene graphs. The scene graph nodes pass the visitor object through the graph, and call for each encountered node the visit method. Subclasses of the Visitor class overload the visit method to implement the visitor's concrete functionality.
| VRS::SceneNodeVisitor::VRS_SERIALIZABLE_CLASS_ENUM | ( | TraversalFlag | ) |
| virtual TraversalFlag VRS::SceneNodeVisitor::visitBehavior | ( | SharedObj * | obj | ) | [virtual] |
| virtual TraversalFlag VRS::SceneNodeVisitor::visitScene | ( | SharedObj * | obj, | |
| bool | pushHint | |||
| ) | [virtual] |
Overloaded by subclasses to implement the visiting functionality. The method returns a traversal flag which indicates whether to stop or to continue the traversal. The visitScene method is called twice for each object in a SceneGraph:
Reimplemented in VRS::FindParentsVisitor.
| virtual void VRS::SceneNodeVisitor::pathPush | ( | SharedObj * | object | ) | [virtual] |
| virtual void VRS::SceneNodeVisitor::pathPop | ( | ) | [virtual] |
| unsigned int VRS::SceneNodeVisitor::pathLength | ( | ) | const |
| SharedObj* VRS::SceneNodeVisitor::pathObject | ( | unsigned int | index | ) | const |
While traversing a graph, `pathLength' returns the current depth of the traversal; the level at the root node is zero, and the path length is one. If the path is recorded, pathElement returns parent node at the i-th level. pathPush is called, if the traversal proceeds from a parent node to child nodes. popPath is called, if the traversal returns from child nodes to the parent node.
| VRS::SceneNodeVisitor::VRS_TYPEINFO | ( | SceneNodeVisitor | , | |
| SharedObj | ||||
| ) |