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

Public Member Functions | |
| virtual bool | started () const |
| virtual bool | canceled () const |
| Report the termination status of the last interaction. | |
| void | setStartCondition (Condition *cond) |
| void | setEndCondition (Condition *cond) |
| void | setProcessCondition (Condition *cond) |
| void | setCancelCondition (Condition *cond) |
| Condition * | getStartCondition () const |
| Condition * | getProcessCondition () const |
| Condition * | getEndCondition () const |
| Condition * | getCancelCondition () const |
| Inquire the conditions attached to the four states. | |
| virtual BehaviorNode::InvalidationHint | handle (Event *) |
| VRS_TYPEINFO (Interaction, LeafBehavior) | |
| VRS_SERIALIZABLE_ABSTRACT_CLASS (Interaction) | |
Protected Member Functions | |
| Interaction (Condition *forStart, Condition *forProcess, Condition *forEnd, Condition *forCancel=0) | |
| virtual int | start (Event *) |
| virtual int | process (Event *) |
| virtual int | end (Event *) |
| virtual int | cancel (Event *) |
| Overwritten by subclasses. | |
A user interaction consists of three logical steps: It is started, it is processed for certain time interval, and it is terminated either regularily (end) or abnormally (canceled). The specific interaction tasks are implemented in four methods (start, process, end, cancel) by subclassing and overwriting these methods. Each method returns true to indicate that a scene redraw is required or false that no redraw is necessary. An interaction node records how an interaction process has been terminated.
| VRS::Interaction::Interaction | ( | Condition * | forStart, | |
| Condition * | forProcess, | |||
| Condition * | forEnd, | |||
| Condition * | forCancel = 0 | |||
| ) | [protected] |
| bool VRS::Interaction::started | ( | ) | const [inline, virtual] |
| bool VRS::Interaction::canceled | ( | ) | const [inline, virtual] |
Report the termination status of the last interaction.
| void VRS::Interaction::setStartCondition | ( | Condition * | cond | ) | [inline] |
| void VRS::Interaction::setEndCondition | ( | Condition * | cond | ) | [inline] |
| void VRS::Interaction::setProcessCondition | ( | Condition * | cond | ) | [inline] |
| void VRS::Interaction::setCancelCondition | ( | Condition * | cond | ) | [inline] |
Conditions specify which events trigger the methods start, stop, process and cancel. Make sure the conditions are disjoint.
| Condition * VRS::Interaction::getStartCondition | ( | ) | const [inline] |
| Condition * VRS::Interaction::getProcessCondition | ( | ) | const [inline] |
| Condition * VRS::Interaction::getEndCondition | ( | ) | const [inline] |
| Condition * VRS::Interaction::getCancelCondition | ( | ) | const [inline] |
Inquire the conditions attached to the four states.
| virtual BehaviorNode::InvalidationHint VRS::Interaction::handle | ( | Event * | ) | [virtual] |
An interaction process can receive and propagate canvas events. Other events are ignored. According to the conditions, `handle' triggers the start, process, end, and abort methods.
Implements VRS::BehaviorNode.
Reimplemented in VRS::ApproachNavigation, VRS::GameNavigation, VRS::JumpNavigation, VRS::Navigation, VRS::PathNavigation, VRS::PhysicalNavigation, VRS::PlaneNavigation, VRS::TrackBall, and VRS::UfoPhysicalNavigation.
| VRS::Interaction::VRS_TYPEINFO | ( | Interaction | , | |
| LeafBehavior | ||||
| ) |
| VRS::Interaction::VRS_SERIALIZABLE_ABSTRACT_CLASS | ( | Interaction | ) |
| virtual int VRS::Interaction::start | ( | Event * | ) | [protected, virtual] |
Reimplemented in VRS::Manipulator.
| virtual int VRS::Interaction::process | ( | Event * | ) | [protected, virtual] |
Reimplemented in VRS::Manipulator.
| virtual int VRS::Interaction::end | ( | Event * | ) | [protected, virtual] |
Reimplemented in VRS::Manipulator.
| virtual int VRS::Interaction::cancel | ( | Event * | ) | [protected, virtual] |
Overwritten by subclasses.