OpenSceneGraph  3.4.0
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
osgManipulator::Dragger Class Reference

Base class for draggers. More...

Inheritance diagram for osgManipulator::Dragger:
Inheritance graph
[legend]

List of all members.

Public Types

typedef std::vector
< osg::ref_ptr< Constraint > > 
Constraints
typedef std::vector
< osg::ref_ptr
< DraggerCallback > > 
DraggerCallbacks

Public Member Functions

 META_Node (osgManipulator, Dragger) virtual void setParentDragger(Dragger *parent)
 Set/Get parent dragger.
DraggergetParentDragger ()
const DraggergetParentDragger () const
virtual const CompositeDraggergetComposite () const
 Returns 0 if this Dragger is not a CompositeDragger.
virtual CompositeDraggergetComposite ()
 Returns 0 if this Dragger is not a CompositeDragger.
void setHandleEvents (bool flag)
bool getHandleEvents () const
void setActivationModKeyMask (unsigned int mask)
unsigned int getActivationModKeyMask () const
void setActivationMouseButtonMask (unsigned int mask)
unsigned int getActivationMouseButtonMask () const
void setActivationKeyEvent (int key)
int getActivationKeyEvent () const
virtual void traverse (osg::NodeVisitor &nv)
 Traverse downwards : calls children's accept method with NodeVisitor.
virtual bool handle (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa)
virtual bool handle (const PointerInfo &, const osgGA::GUIEventAdapter &, osgGA::GUIActionAdapter &)
void addConstraint (Constraint *constraint)
void removeConstraint (Constraint *constraint)
ConstraintsgetConstraints ()
const ConstraintsgetConstraints () const
void addDraggerCallback (DraggerCallback *dc)
void removeDraggerCallback (DraggerCallback *dc)
DraggerCallbacksgetDraggerCallbacks ()
const DraggerCallbacksgetDraggerCallbacks () const
void addTransformUpdating (MatrixTransform *transform, int handleCommandMask=DraggerTransformCallback::HANDLE_ALL)
void removeTransformUpdating (MatrixTransform *transform)
virtual void setupDefaultGeometry ()
 Setup default geometry for dragger.
virtual bool receive (const MotionCommand &command)
virtual void dispatch (MotionCommand &command)
void setDraggerActive (bool active)
bool getDraggerActive () const
virtual void setIntersectionMask (osg::Node::NodeMask intersectionMask)
 Set/Get the traversal mask used by this dragger when looking for intersections during event handling.
osg::Node::NodeMask getIntersectionMask () const

Protected Member Functions

 Dragger ()
 Dragger (const Dragger &rhs, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
virtual ~Dragger ()

Protected Attributes

bool _handleEvents
bool _draggerActive
unsigned int _activationModKeyMask
unsigned int _activationMouseButtonMask
int _activationKeyEvent
bool _activationPermittedByModKeyMask
bool _activationPermittedByMouseButtonMask
bool _activationPermittedByKeyEvent
osgManipulator::PointerInfo _pointer
Dragger_parentDragger
osg::ref_ptr< DraggerCallback_selfUpdater
Constraints _constraints
DraggerCallbacks _draggerCallbacks
osg::Node::NodeMask _intersectionMask

Detailed Description

Base class for draggers.

Concrete draggers implement the pick event handler and generate motion commands (translate, rotate, ...) and sends these command to all the DraggerCallbacks & Transforms that are connected to the Dragger that generates the commands.


Member Typedef Documentation


Constructor & Destructor Documentation

osgManipulator::Dragger::Dragger ( const Dragger rhs,
const osg::CopyOp copyop = osg::CopyOp::SHALLOW_COPY 
) [protected]
virtual osgManipulator::Dragger::~Dragger ( ) [protected, virtual]

Member Function Documentation

virtual void osgManipulator::Dragger::dispatch ( MotionCommand command) [virtual]
unsigned int osgManipulator::Dragger::getActivationModKeyMask ( ) const [inline]
virtual const CompositeDragger* osgManipulator::Dragger::getComposite ( ) const [inline, virtual]

Returns 0 if this Dragger is not a CompositeDragger.

Reimplemented in osgManipulator::CompositeDragger.

Returns 0 if this Dragger is not a CompositeDragger.

Reimplemented in osgManipulator::CompositeDragger.

virtual bool osgManipulator::Dragger::handle ( const osgGA::GUIEventAdapter ea,
osgGA::GUIActionAdapter aa 
) [virtual]
virtual bool osgManipulator::Dragger::handle ( const PointerInfo ,
const osgGA::GUIEventAdapter ,
osgGA::GUIActionAdapter  
) [inline, virtual]
osgManipulator::Dragger::META_Node ( osgManipulator  ,
Dragger   
) [inline]

Set/Get parent dragger.

For simple draggers parent points to itself. For composite draggers parent points to the parent dragger that uses this dragger.

virtual bool osgManipulator::Dragger::receive ( const MotionCommand command) [virtual]
void osgManipulator::Dragger::setActivationModKeyMask ( unsigned int  mask) [inline]
void osgManipulator::Dragger::setActivationMouseButtonMask ( unsigned int  mask) [inline]
void osgManipulator::Dragger::setDraggerActive ( bool  active) [inline]
virtual void osgManipulator::Dragger::setIntersectionMask ( osg::Node::NodeMask  intersectionMask) [inline, virtual]

Set/Get the traversal mask used by this dragger when looking for intersections during event handling.

This is useful to "hide" some geometry during event handling.

Reimplemented in osgManipulator::CompositeDragger.

virtual void osgManipulator::Dragger::setupDefaultGeometry ( ) [inline, virtual]
virtual void osgManipulator::Dragger::traverse ( osg::NodeVisitor ) [virtual]

Traverse downwards : calls children's accept method with NodeVisitor.

Reimplemented from osg::Group.


Member Data Documentation


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

osg logo
Generated at Tue Dec 8 2015 00:16:48 for the OpenSceneGraph by doxygen 1.7.6.1.