From c2c38955c66624ad5cf5e91c85469c8eec302ecc Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 17 Jan 2003 14:12:25 +0000 Subject: [PATCH] Added new getCurrentCamaeraManipulator(), and removed and debugging message. --- include/osgGA/KeySwitchCameraManipulator | 5 +++++ src/osgGA/KeySwitchCameraManipulator.cpp | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/osgGA/KeySwitchCameraManipulator b/include/osgGA/KeySwitchCameraManipulator index 57a2acb5a..53a41a5b1 100644 --- a/include/osgGA/KeySwitchCameraManipulator +++ b/include/osgGA/KeySwitchCameraManipulator @@ -36,8 +36,13 @@ public: */ void addNumberedCameraManipulator(CameraManipulator *cm); + CameraManipulator* getCurrentCameraManipulator() { return _current.get(); } + + const CameraManipulator* getCurrentCameraManipulator() const { return _current.get(); } + // Overrides from CameraManipulator... + virtual void setCamera(osg::Camera* c) { _current->setCamera(c); } virtual const osg::Camera * getCamera() const { return _current->getCamera(); } diff --git a/src/osgGA/KeySwitchCameraManipulator.cpp b/src/osgGA/KeySwitchCameraManipulator.cpp index 0e89d5de7..1f4cd6589 100644 --- a/src/osgGA/KeySwitchCameraManipulator.cpp +++ b/src/osgGA/KeySwitchCameraManipulator.cpp @@ -27,7 +27,6 @@ bool KeySwitchCameraManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapt KeyManipMap::iterator it=_manips.find(ea.getKey()); if(it != _manips.end()){ osg::notify(osg::INFO)<<"Switching to manipulator: "<<(*it).second.first<second.second->setNode(_current->getNode()); it->second.second->setCamera(_current->getCamera()); it->second.second->init(ea,aa);