Added typedef and updated wrappers
This commit is contained in:
@@ -47,8 +47,10 @@ class OSGMANIPULATOR_EXPORT CommandManager : public osg::Referenced
|
||||
/** Add all selections connected to the dragger to the command. */
|
||||
void addSelectionsToCommand(MotionCommand& command, Dragger& dragger);
|
||||
|
||||
typedef std::list osg::ref_ptr<Selection> > Selections;
|
||||
|
||||
/** Returns the selections connected to the dragger */
|
||||
std::list< osg::ref_ptr<Selection> > getConnectedSelections(Dragger& dragger);
|
||||
Selections getConnectedSelections(Dragger& dragger);
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ bool CommandManager::connect(Dragger& dragger, Selection& selection)
|
||||
{
|
||||
if (iter->second == &selection)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Associate selection with dragger
|
||||
@@ -62,7 +62,7 @@ bool CommandManager::connect(Dragger& dragger, Constraint& constraint)
|
||||
{
|
||||
if (iter->second == &constraint)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Associate selection with dragger
|
||||
@@ -101,10 +101,10 @@ void CommandManager::addSelectionsToCommand(MotionCommand& command, Dragger& dra
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Add the dragger to the selection list first.
|
||||
command.addSelection(&dragger);
|
||||
|
||||
|
||||
// Add the remaining selections.
|
||||
if (_draggerSelectionMap.count(&dragger) > 0)
|
||||
{
|
||||
@@ -124,9 +124,9 @@ void CommandManager::addSelectionsToCommand(MotionCommand& command, Dragger& dra
|
||||
}
|
||||
|
||||
|
||||
std::list< osg::ref_ptr<Selection> > CommandManager::getConnectedSelections(Dragger& dragger)
|
||||
CommandManager::Selections CommandManager::getConnectedSelections(Dragger& dragger)
|
||||
{
|
||||
std::list< osg::ref_ptr<Selection> > selections = std::list< osg::ref_ptr<Selection> >();
|
||||
Selections selections = std::list< osg::ref_ptr<Selection> >();
|
||||
|
||||
//Test if the dragger is in the list
|
||||
if (_draggerSelectionMap.count(&dragger) > 0)
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#undef OUT
|
||||
#endif
|
||||
|
||||
TYPE_NAME_ALIAS(std::list osg::ref_ptr< osgManipulator::Selection >, osgManipulator::CommandManager::Selections)
|
||||
|
||||
BEGIN_OBJECT_REFLECTOR(osgManipulator::CommandManager)
|
||||
I_DeclaringFile("osgManipulator/CommandManager");
|
||||
I_BaseType(osg::Referenced);
|
||||
@@ -55,5 +57,12 @@ BEGIN_OBJECT_REFLECTOR(osgManipulator::CommandManager)
|
||||
__void__addSelectionsToCommand__MotionCommand_R1__Dragger_R1,
|
||||
"Add all selections connected to the dragger to the command. ",
|
||||
"");
|
||||
I_Method1(osgManipulator::CommandManager::Selections, getConnectedSelections, IN, osgManipulator::Dragger &, dragger,
|
||||
Properties::NON_VIRTUAL,
|
||||
__Selections__getConnectedSelections__Dragger_R1,
|
||||
"Returns the selections connected to the dragger. ",
|
||||
"");
|
||||
END_REFLECTOR
|
||||
|
||||
STD_LIST_REFLECTOR(std::list osg::ref_ptr< osgManipulator::Selection >)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user