From 5cb765ff25a8b1927bac6e8fd511d944b98c222d Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 20 Jan 2003 11:54:34 +0000 Subject: [PATCH] Clean up to the osgproducer demo. --- src/Demos/osgproducer/osgproducer.cpp | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/src/Demos/osgproducer/osgproducer.cpp b/src/Demos/osgproducer/osgproducer.cpp index 49ca054c3..88bba2f15 100644 --- a/src/Demos/osgproducer/osgproducer.cpp +++ b/src/Demos/osgproducer/osgproducer.cpp @@ -128,23 +128,13 @@ int main( int argc, char **argv ) // create a camera to use with the manipulators. osg::ref_ptr old_style_osg_camera = new osg::Camera; - osg::ref_ptr trackballManipulator = new osgGA::TrackballManipulator; - trackballManipulator->setCamera(old_style_osg_camera.get()); - trackballManipulator->setNode(loadedModel.get()); - - osg::ref_ptr flightManipulator = new osgGA::FlightManipulator; - flightManipulator->setCamera(old_style_osg_camera.get()); - flightManipulator->setNode(loadedModel.get()); - - osg::ref_ptr driveManipulator = new osgGA::DriveManipulator; - driveManipulator->setCamera(old_style_osg_camera.get()); - driveManipulator->setNode(loadedModel.get()); - - osg::ref_ptr keyswitchManipulator = new osgGA::KeySwitchCameraManipulator; - keyswitchManipulator->addNumberedCameraManipulator(trackballManipulator.get()); - keyswitchManipulator->addNumberedCameraManipulator(flightManipulator.get()); - keyswitchManipulator->addNumberedCameraManipulator(driveManipulator.get()); + keyswitchManipulator->addNumberedCameraManipulator(new osgGA::TrackballManipulator); + keyswitchManipulator->addNumberedCameraManipulator(new osgGA::FlightManipulator); + keyswitchManipulator->addNumberedCameraManipulator(new osgGA::DriveManipulator); + + keyswitchManipulator->setCamera(old_style_osg_camera.get()); + keyswitchManipulator->setNode(loadedModel.get()); osg::ref_ptr statesetManipulator = new osgGA::StateSetManipulator;