version 3.3

VRS::Manipulator Class Reference

Abstract Base Class for Select & Drag Interactions. More...

#include <vrs/sg/manipulator.h>

Inheritance diagram for VRS::Manipulator:

VRS::Interaction VRS::LeafBehavior VRS::BehaviorNode VRS::SharedObj VRS::Visitable 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

 Manipulator (InputEvent::Button button, InputEvent::Modifier must_modifier=InputEvent::NoModifier, InputEvent::Modifier must_not_modifier=InputEvent::NoModifier, Callback *startCallback=(Callback *) 0, Callback *motionCallback=(Callback *) 0, Callback *endCallback=(Callback *) 0)
virtual ~Manipulator ()
virtual
BehaviorNode::InvalidationHint 
dragStart (int x, int y, ButtonEvent *e)=0
virtual
BehaviorNode::InvalidationHint 
dragMotion (int x, int y, MotionEvent *e)=0
virtual
BehaviorNode::InvalidationHint 
dragEnd (int x, int y, ButtonEvent *e)=0
void setStartCallback (Callback *action)
CallbackgetStartCallback () const
void setMotionCallback (Callback *action)
CallbackgetMotionCallback () const
void setEndCallback (Callback *action)
CallbackgetEndCallback () const
 VRS_TYPEINFO (Manipulator, Interaction)
 VRS_SERIALIZABLE_ABSTRACT_CLASS (Manipulator)

Protected Member Functions

virtual int start (Event *)
virtual int process (Event *)
virtual int end (Event *)


Detailed Description

Abstract Base Class for Select & Drag Interactions.

Constructor & Destructor Documentation

VRS::Manipulator::Manipulator ( InputEvent::Button  button,
InputEvent::Modifier  must_modifier = InputEvent::NoModifier,
InputEvent::Modifier  must_not_modifier = InputEvent::NoModifier,
Callback startCallback = (Callback *) 0,
Callback motionCallback = (Callback *) 0,
Callback endCallback = (Callback *) 0 
)

virtual VRS::Manipulator::~Manipulator (  )  [virtual]

A manipulator starts if the specified mouse button is pressed. An interaction is process as long as button motion events are received. It is stopped if the mouse button is released. A manipulator sets up internally the condition objects required by the base class.


Member Function Documentation

virtual BehaviorNode::InvalidationHint VRS::Manipulator::dragStart ( int  x,
int  y,
ButtonEvent e 
) [pure virtual]

virtual BehaviorNode::InvalidationHint VRS::Manipulator::dragMotion ( int  x,
int  y,
MotionEvent e 
) [pure virtual]

virtual BehaviorNode::InvalidationHint VRS::Manipulator::dragEnd ( int  x,
int  y,
ButtonEvent e 
) [pure virtual]

These methods implements the concrete manipulator functionality. They are overloaded by subclasses. `dragStart' is called if an event of type `ButtonEvent` is received which matches the button condition. `dragMotion' is called if the interaction has been started already and an `MotionEvent' has been received which matches the modifier conditions. `dragEnd' is called if the interaction has been started already and an event of type `ButtonEvent' has been received which matches the button condition. The return value specifies the redrawing code required by `handle'. (It specifies if the world, a canvas or nothing has to be redrawn).

Implemented in VRS::ApproachNavigation, VRS::AxonometricLookAtManipulator, VRS::GameNavigation, VRS::LookAtManipulator, VRS::Navigation, VRS::PaneManipulator, VRS::PhysicalNavigation, VRS::PlaneNavigation, VRS::Selector, and VRS::TrackBall.

void VRS::Manipulator::setStartCallback ( Callback action  ) 

Callback * VRS::Manipulator::getStartCallback (  )  const [inline]

The subclasses of `Manipulator' decide how to use the callbacks.

void VRS::Manipulator::setMotionCallback ( Callback action  ) 

Callback * VRS::Manipulator::getMotionCallback (  )  const [inline]

The subclasses of `Manipulator' decide how to use the callbacks.

void VRS::Manipulator::setEndCallback ( Callback action  ) 

Callback * VRS::Manipulator::getEndCallback (  )  const [inline]

The subclasses of `Manipulator' decide how to use the callbacks.

VRS::Manipulator::VRS_TYPEINFO ( Manipulator  ,
Interaction   
)

VRS::Manipulator::VRS_SERIALIZABLE_ABSTRACT_CLASS ( Manipulator   ) 

virtual int VRS::Manipulator::start ( Event  )  [protected, virtual]

Reimplemented from VRS::Interaction.

virtual int VRS::Manipulator::process ( Event  )  [protected, virtual]

Reimplemented from VRS::Interaction.

virtual int VRS::Manipulator::end ( Event  )  [protected, virtual]

Reimplemented from VRS::Interaction.


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