version 3.3

VRS::Selector Class Reference

Manipulator for Interactive Ray Tests. More...

#include <vrs/sg/selector.h>

Inheritance diagram for VRS::Selector:

VRS::Manipulator VRS::Interaction VRS::LeafBehavior VRS::BehaviorNode VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

 Selector (InputEvent::Button button, InputEvent::Modifier must_modifier=InputEvent::NoModifier, InputEvent::Modifier must_not_modifier=InputEvent::NoModifier, RayRequest *startRequest=(RayRequest *) 0, RayRequest *motionRequest=(RayRequest *) 0, RayRequest *endRequest=(RayRequest *) 0, Callback *startCallback=(Callback *) 0, Callback *motionCallback=(Callback *) 0, Callback *endCallback=(Callback *) 0)
void setStartRequest (RayRequest *rayreq)
RayRequestgetStartRequest () const
void setMotionRequest (RayRequest *rayreq)
RayRequestgetMotionRequest () const
void setEndRequest (RayRequest *rayreq)
RayRequestgetEndRequest () const
virtual
BehaviorNode::InvalidationHint 
dragStart (int x, int y, ButtonEvent *e)
virtual
BehaviorNode::InvalidationHint 
dragMotion (int x, int y, MotionEvent *e)
virtual
BehaviorNode::InvalidationHint 
dragEnd (int x, int y, ButtonEvent *e)
void dragRedraw (int flag)
InputEventdragEvent () const
 VRS_TYPEINFO (Selector, Manipulator)


Detailed Description

Manipulator for Interactive Ray Tests.

Constructor & Destructor Documentation

VRS::Selector::Selector ( InputEvent::Button  button,
InputEvent::Modifier  must_modifier = InputEvent::NoModifier,
InputEvent::Modifier  must_not_modifier = InputEvent::NoModifier,
RayRequest startRequest = (RayRequest *) 0,
RayRequest motionRequest = (RayRequest *) 0,
RayRequest endRequest = (RayRequest *) 0,
Callback startCallback = (Callback *) 0,
Callback motionCallback = (Callback *) 0,
Callback endCallback = (Callback *) 0 
)

Performs the ray request during a mouse interaction. The results of ray requests are stored in the ray request objects.


Member Function Documentation

void VRS::Selector::setStartRequest ( RayRequest rayreq  )  [inline]

RayRequest * VRS::Selector::getStartRequest (  )  const [inline]

void VRS::Selector::setMotionRequest ( RayRequest rayreq  )  [inline]

RayRequest * VRS::Selector::getMotionRequest (  )  const [inline]

void VRS::Selector::setEndRequest ( RayRequest rayreq  )  [inline]

RayRequest * VRS::Selector::getEndRequest (  )  const [inline]

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

Implements VRS::Manipulator.

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

Implements VRS::Manipulator.

virtual BehaviorNode::InvalidationHint VRS::Selector::dragEnd ( int  x,
int  y,
ButtonEvent e 
) [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).

Implements VRS::Manipulator.

void VRS::Selector::dragRedraw ( int  flag  )  [inline]

InputEvent * VRS::Selector::dragEvent (  )  const [inline]

The drag methods perform ray requests with the corresponding ray request object. If no ray request object is specified or if its "mode" is set to `RayRequestDoNothing', nothing is done. The callbacks are execute in always. Each time a drag method is called, it sets the return code for refreshing the window to `BehaviorRedrawWindow'. To set the return code to a different code, use 'dragRedraw' - this return code will be used instead, but only one time. `dragEvent' returns the event responsible for calling a drag method. It is only availabe during the call of one of the drag methods and callbacks.

VRS::Selector::VRS_TYPEINFO ( Selector  ,
Manipulator   
)


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

Generated on Tue May 22 06:00:30 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact