version 3.3

VRS::PickingCallback Class Reference

Easy-to-use picking callback for shapes. More...

#include <vrs/sg/pickingcallback.h>

Inheritance diagram for VRS::PickingCallback:

VRS::LeafBehavior VRS::BehaviorNode VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

 PickingCallback (const SO< Callback1< IntersectionInfo * > > &callback, const SO< Shape > &shape=NULL, ButtonEvent::Button button=ButtonEvent::MouseButton1, ButtonEvent::Change action=ButtonEvent::Released, ButtonEvent::Modifier modifier=ButtonEvent::NoModifier)
 PickingCallback (const SO< Callback1< IntersectionInfo * > > &callback, const SO< Iterator< SO< Shape > > > &shapes, ButtonEvent::Button button=ButtonEvent::MouseButton1, ButtonEvent::Change action=ButtonEvent::Released, ButtonEvent::Modifier modifier=ButtonEvent::NoModifier)
virtual
BehaviorNode::InvalidationHint 
handle (Event *event)
 Realizes the picking callback behavior.
 VRS_TYPEINFO (PickingCallback, LeafBehavior)


Detailed Description

Easy-to-use picking callback for shapes.

Constructor & Destructor Documentation

VRS::PickingCallback::PickingCallback ( const SO< Callback1< IntersectionInfo * > > &  callback,
const SO< Shape > &  shape = NULL,
ButtonEvent::Button  button = ButtonEvent::MouseButton1,
ButtonEvent::Change  action = ButtonEvent::Released,
ButtonEvent::Modifier  modifier = ButtonEvent::NoModifier 
)

The given callback is called if the given shape is hit by the mouse pointer and the given conditions (mouse button, mouse action, and additional modifier key) are satisfied. The argument of the callback is an intersection info object (see IntersectionInfo) obtained by a ray query (see RayQuery). If no shape is specified, the callback is called for each shape.

VRS::PickingCallback::PickingCallback ( const SO< Callback1< IntersectionInfo * > > &  callback,
const SO< Iterator< SO< Shape > > > &  shapes,
ButtonEvent::Button  button = ButtonEvent::MouseButton1,
ButtonEvent::Change  action = ButtonEvent::Released,
ButtonEvent::Modifier  modifier = ButtonEvent::NoModifier 
)

The given callback is called if one of the given shapes is hit by the mouse pointer and the given conditions (mouse button, mouse action, and additional modifier key) are satisfied. The argument of the callback is an intersection info object (see IntersectionInfo) obtained by a ray query (see RayQuery).


Member Function Documentation

virtual BehaviorNode::InvalidationHint VRS::PickingCallback::handle ( Event event  )  [virtual]

Realizes the picking callback behavior.

Implements VRS::BehaviorNode.

VRS::PickingCallback::VRS_TYPEINFO ( PickingCallback  ,
LeafBehavior   
)


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

Generated on Wed May 22 06:00:32 2013 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact