testbed/src/Scene.cpp
void Scene::resetCameraToViewAll() {

    // Move the camera to the origin of the scene
    mCamera.translateWorld(-mCamera.getOrigin());

    // Move the camera
    mCamera.translateWorld(mCenterScene);

    // Set the zoom of the camera so that the scene center is
    // in negative view direction of the camera
    mCamera.setZoom(mInitZoom);
}
// Set the camera so that we can view the whole scene
Set the camera so that we can view the whole scene
Set the camera so that we can view the whole scene
void Scene::resetCameraToViewAll() {
    mCamera.translateWorld(-mCamera.getOrigin());
    mCamera.translateWorld(mCenterScene);
    mCamera.setZoom(mInitZoom);
}
void Scene :: resetCameraToViewAll ( ) { mCamera . translateWorld ( - mCamera . getOrigin ( ) ) ; mCamera . translateWorld ( mCenterScene ) ; mCamera . setZoom ( mInitZoom ) ; }
Set the camera so that we can view the whole scene
Set the camera so that we can view the whole scene
// Move the camera to the origin of the scene // Move the camera // Set the zoom of the camera so that the scene center is // in negative view direction of the camera