From 4b220d4fd7f87913613e659570bb3783c7b560a0 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 9 Jul 2012 17:49:04 +0000 Subject: [PATCH] Changed updateCamera(Camera*) to updateCamera(Camera&) to make it clear that a valid Camera object should be passed in. --- include/osgGA/CameraManipulator | 2 +- src/osgViewer/CompositeViewer.cpp | 2 +- src/osgViewer/Viewer.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/osgGA/CameraManipulator b/include/osgGA/CameraManipulator index 9c610a898..761dbd09e 100644 --- a/include/osgGA/CameraManipulator +++ b/include/osgGA/CameraManipulator @@ -89,7 +89,7 @@ class OSGGA_EXPORT CameraManipulator : public GUIEventHandler /** update the camera for the current frame, typically called by the viewer classes. Default implementation simply set the camera view matrix. */ - virtual void updateCamera(osg::Camera* camera) { camera->setViewMatrix(getInverseMatrix()); } + virtual void updateCamera(osg::Camera& camera) { camera.setViewMatrix(getInverseMatrix()); } /** Get the FusionDistanceMode. Used by SceneView for setting up stereo convergence.*/ virtual osgUtil::SceneView::FusionDistanceMode getFusionDistanceMode() const { return osgUtil::SceneView::PROPORTIONAL_TO_SCREEN_DISTANCE; } diff --git a/src/osgViewer/CompositeViewer.cpp b/src/osgViewer/CompositeViewer.cpp index 1ce254414..43155438d 100644 --- a/src/osgViewer/CompositeViewer.cpp +++ b/src/osgViewer/CompositeViewer.cpp @@ -1159,7 +1159,7 @@ void CompositeViewer::updateTraversal() view->setFusionDistance( view->getCameraManipulator()->getFusionDistanceMode(), view->getCameraManipulator()->getFusionDistanceValue() ); - view->getCameraManipulator()->updateCamera(view->getCamera()); + view->getCameraManipulator()->updateCamera(*(view->getCamera())); } view->updateSlaves(); diff --git a/src/osgViewer/Viewer.cpp b/src/osgViewer/Viewer.cpp index 8430eaa82..1c612d823 100644 --- a/src/osgViewer/Viewer.cpp +++ b/src/osgViewer/Viewer.cpp @@ -1038,7 +1038,7 @@ void Viewer::updateTraversal() setFusionDistance( getCameraManipulator()->getFusionDistanceMode(), getCameraManipulator()->getFusionDistanceValue() ); - _cameraManipulator->updateCamera(_camera); + _cameraManipulator->updateCamera(*_camera); } updateSlaves();