version 3.3

VRS::Interaction Class Reference

Abstract Base Class for Interaction Processes. More...

#include <vrs/sg/interaction.h>

Inheritance diagram for VRS::Interaction:

VRS::LeafBehavior VRS::BehaviorNode VRS::SharedObj VRS::Visitable VRS::Manipulator VRS::AxonometricLookAtManipulator VRS::LookAtManipulator VRS::Navigation VRS::PaneManipulator VRS::Selector VRS::TrackBall VRS::ApproachNavigation VRS::GameNavigation VRS::JumpNavigation VRS::PathNavigation VRS::PhysicalNavigation VRS::PlaneNavigation VRS::FlyerPhysicalNavigation VRS::UfoPhysicalNavigation

List of all members.

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)
ConditiongetStartCondition () const
ConditiongetProcessCondition () const
ConditiongetEndCondition () const
ConditiongetCancelCondition () 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.


Detailed Description

Abstract Base Class for Interaction Processes.

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.


Constructor & Destructor Documentation

VRS::Interaction::Interaction ( Condition forStart,
Condition forProcess,
Condition forEnd,
Condition forCancel = 0 
) [protected]


Member Function Documentation

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.


The documentation for this class was generated from the following file:

Generated on Mon May 21 06:00:26 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact