Commits

Anonymous committed f92c8eb Draft

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

  • Participants
  • Parent commits 222ff1d

Comments (0)

Files changed (3)

File include/osgGA/CameraManipulator

 
         /** 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; }

File src/osgViewer/CompositeViewer.cpp

             view->setFusionDistance( view->getCameraManipulator()->getFusionDistanceMode(),
                                     view->getCameraManipulator()->getFusionDistanceValue() );
             
-            view->getCameraManipulator()->updateCamera(view->getCamera());
+            view->getCameraManipulator()->updateCamera(*(view->getCamera()));
             
         }
         view->updateSlaves();

File src/osgViewer/Viewer.cpp

         setFusionDistance( getCameraManipulator()->getFusionDistanceMode(),
                             getCameraManipulator()->getFusionDistanceValue() );
 
-        _cameraManipulator->updateCamera(_camera);
+        _cameraManipulator->updateCamera(*_camera);
     }
 
     updateSlaves();