OpenSceneGraph 2.8.4
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
osgManipulator::CommandManager Class Reference

Command manager receives commands from draggers and dispatches them to selections. More...

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

List of all members.

Public Member Functions

 CommandManager ()
virtual bool connect (Dragger &dragger, Selection &selection)
 Connect a dragger to a selection.
virtual bool connect (Dragger &dragger, Constraint &constrain)
virtual bool disconnect (Dragger &dragger)
 Disconnect the selections from a dragger.
virtual void dispatch (MotionCommand &command)
 Dispatches a command.
void addSelectionsToCommand (MotionCommand &command, Dragger &dragger)
 Add all selections connected to the dragger to the command.

Protected Types

typedef std::multimap
< osg::ref_ptr< Dragger >
, osg::ref_ptr< Selection > > 
DraggerSelectionMap
typedef std::multimap
< osg::ref_ptr< Dragger >
, osg::ref_ptr< Constraint > > 
DraggerConstraintMap

Protected Member Functions

virtual ~CommandManager ()

Protected Attributes

DraggerSelectionMap _draggerSelectionMap
DraggerConstraintMap _draggerConstraintMap

Detailed Description

Command manager receives commands from draggers and dispatches them to selections.


Member Typedef Documentation


Constructor & Destructor Documentation

osgManipulator::CommandManager::CommandManager ( )
virtual osgManipulator::CommandManager::~CommandManager ( ) [protected, virtual]

Member Function Documentation

void osgManipulator::CommandManager::addSelectionsToCommand ( MotionCommand command,
Dragger dragger 
)

Add all selections connected to the dragger to the command.

virtual bool osgManipulator::CommandManager::connect ( Dragger dragger,
Constraint constrain 
) [virtual]
virtual bool osgManipulator::CommandManager::connect ( Dragger dragger,
Selection selection 
) [virtual]

Connect a dragger to a selection.

The selection will begin listening to commands generated by the dragger. This can be called multiple times to connect many selections to a dragger.

virtual bool osgManipulator::CommandManager::disconnect ( Dragger dragger) [virtual]

Disconnect the selections from a dragger.

virtual void osgManipulator::CommandManager::dispatch ( MotionCommand command) [virtual]

Dispatches a command.

Usually called from a dragger.


Member Data Documentation


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

osg logo
Generated at Sun Jan 8 2012 13:16:45 for the OpenSceneGraph by doxygen 1.7.4.