Change the KeySwitchMatrixManipulator so that it two sets of getMatrixManipulator

methods, two that takes an index,two that takes a key value.  Updated the ViewEventHandler
so the it now uses the getMatrixManipulatorWithIndex() method to avoid previous ambiguity.
This commit is contained in:
Robert Osfield
2005-11-14 11:00:36 +00:00
parent 5de633f71b
commit 9d8fd69fa9
4 changed files with 43 additions and 11 deletions

View File

@@ -1080,9 +1080,10 @@ bool ViewerEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActio
osgGA::KeySwitchMatrixManipulator* kscm = viewer->getKeySwitchMatrixManipulator();
if (kscm)
{
for(apmNo=0;apmNo<kscm->getNumMatrixManipulators() && apm==0;++apmNo)
for(apmNo=0;apmNo<kscm->getNumMatrixManipulators();++apmNo)
{
apm = dynamic_cast<osgGA::AnimationPathManipulator*>(kscm->getMatrixManipulator(apmNo));
apm = dynamic_cast<osgGA::AnimationPathManipulator*>(kscm->getMatrixManipulatorWithIndex(apmNo));
if (apm) break;
}
}