Added getCameraByName method to viewer
This commit is contained in:
parent
5d10547ac5
commit
8eb0e8ca88
@ -913,6 +913,21 @@ bool Viewer::selectCameraManipulatorByName( const std::string &name )
|
||||
return true;
|
||||
}
|
||||
|
||||
osgGA::MatrixManipulator *Viewer::getCameraManipulatorByName( const std::string &name )
|
||||
{
|
||||
osgGA::KeySwitchMatrixManipulator *ksm = getKeySwitchMatrixManipulator();
|
||||
osgGA::KeySwitchMatrixManipulator::KeyManipMap &kmmap = ksm->getKeyManipMap();
|
||||
osgGA::KeySwitchMatrixManipulator::KeyManipMap::iterator p;
|
||||
for( p = kmmap.begin(); p != kmmap.end(); p++ )
|
||||
{
|
||||
osgGA::KeySwitchMatrixManipulator::NamedManipulator nm = (*p).second;
|
||||
if( nm.first == name )
|
||||
return nm.second.get();
|
||||
}
|
||||
return 0L;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Viewer::requestRedraw()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user