"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Viewer/viewmgr.cxx" between
flightgear-2020.3.7.tar.bz2 and flightgear-2020.3.8.tar.bz2

About: FlightGear is a multi-platform, cooperative flight simulator development project.

viewmgr.cxx  (flightgear-2020.3.7.tar.bz2):viewmgr.cxx  (flightgear-2020.3.8.tar.bz2)
skipping to change at line 33 skipping to change at line 33
#include "config.h" #include "config.h"
#include <algorithm> // for std::clamp #include <algorithm> // for std::clamp
#include "viewmgr.hxx" #include "viewmgr.hxx"
#include "ViewPropertyEvaluator.hxx" #include "ViewPropertyEvaluator.hxx"
#include <simgear/compiler.h> #include <simgear/compiler.h>
#include <simgear/scene/util/OsgMath.hxx> #include <simgear/scene/util/OsgMath.hxx>
#include <simgear/structure/exception.hxx>
#include <Main/fg_props.hxx> #include <Main/fg_props.hxx>
#include "view.hxx" #include "view.hxx"
#include "CameraGroup.hxx" #include "CameraGroup.hxx"
namespace { namespace {
template <typename T> template <typename T>
T not_std_clamp(const T& v, const T& lower, const T& upper) T not_std_clamp(const T& v, const T& lower, const T& upper)
skipping to change at line 185 skipping to change at line 186
flightgear::View* currentView = get_current_view(); flightgear::View* currentView = get_current_view();
if (!currentView) { if (!currentView) {
return; return;
} }
// Update the current view // Update the current view
currentView->update(dt); currentView->update(dt);
// update the camera now // update the camera now
osg::ref_ptr<flightgear::CameraGroup> cameraGroup = flightgear::CameraGroup: :getDefault(); osg::ref_ptr<flightgear::CameraGroup> cameraGroup = flightgear::CameraGroup: :getDefault();
if (!cameraGroup) {
// attempting to diagnose the cause of FLIGHTGEAR-H9F
throw sg_exception("FGViewMgr::update: no camera group exists");
}
cameraGroup->setCameraParameters(currentView->get_v_fov(), cameraGroup->setCameraParameters(currentView->get_v_fov(),
cameraGroup->getMasterAspectRatio()); cameraGroup->getMasterAspectRatio());
cameraGroup->update(toOsg(currentView->getViewPosition()), cameraGroup->update(toOsg(currentView->getViewPosition()),
toOsg(currentView->getViewOrientation())); toOsg(currentView->getViewOrientation()));
} }
void FGViewMgr::clear() void FGViewMgr::clear()
{ {
views.clear(); views.clear();
} }
flightgear::View* flightgear::View*
 End of changes. 3 change blocks. 
1 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)