class Traversable

Description

This class is the base class for all of the proxy object classes. The presenter will call these methods on the proxy object associated with the root scene object, which will propagate the method to all nodes in the scene.

Proxy class hierarchy

Traversable

Methods

The Traversable class defines the following functions, all of which are virtual functions to be overridden by the derived classes. Unless shown, these functions are empty in this class.

    virtual void UpdateTimeSensor() {}
This function will recursively traverse the scene tree, updating all TimeSensor nodes. This traversal of the scene tree will be done before the PreRender traversal, as the time sensor nodes will generate changes to fields which need to be reflected in the drawing of the scene.

The default implementation is to do nothing. Grouping nodes and the TimeSensor node will override this.

    virtual void PreRender(Effects const& effects)
This function will recursively traverse the scene tree, determining where every object will appear (cumulation of all transformation matricies).

During this traversal, a node which is to be drawn has to call VisualRenderer::AddToDrawList(). Even if the node has not changed since PreRender() was last called, the node must still be registered with the VisualRenderer.

    virtual BOOL IsFinished() const
Return TRUE if this node has finished, or FALSE otherwise. Once all nodes in the scene are finished, the Presenter stops rendering the scene.

    virtual BOOL OnUserEvent(EventInfo const*) { return FALSE; }
Return TRUE if this is a TouchSensor node (which will handle the given event), otherwise return FALSE. The default implementation returns FALSE.

    virtual void Print(FILE* outfile, int depth) const
Print out the fields and corresponding values for the media object derived node that this object is a proxy for, indented according to the given depth. This method is intended to be primarily used for debugging.