Changed updateCamera(Camera*) to updateCamera(Camera&) to make it clear that a valid Camera object should be passed in.

This commit is contained in:
Robert Osfield 2012-07-09 17:49:04 +00:00
parent 65ab874143
commit 4b220d4fd7
3 changed files with 3 additions and 3 deletions

View File

@ -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; }

View File

@ -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();

View File

@ -1038,7 +1038,7 @@ void Viewer::updateTraversal()
setFusionDistance( getCameraManipulator()->getFusionDistanceMode(),
getCameraManipulator()->getFusionDistanceValue() );
_cameraManipulator->updateCamera(_camera);
_cameraManipulator->updateCamera(*_camera);
}
updateSlaves();