X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FMain%2Fviewer.cxx;h=f2ffd56c9d57a5fae327aae613bc7e6fc6068f45;hb=18d1593c42c2df60d7fb44ace722ca3e8a7fd82c;hp=7c4388b16a78c202ec93d989121b02f40981d602;hpb=7810fbc632618460dc89a9abfe28de145ed1b2ff;p=flightgear.git diff --git a/src/Main/viewer.cxx b/src/Main/viewer.cxx index 7c4388b16..f2ffd56c9 100644 --- a/src/Main/viewer.cxx +++ b/src/Main/viewer.cxx @@ -37,7 +37,6 @@ #include #include -#include #include #include #include @@ -50,6 +49,9 @@ #include "viewer.hxx" +#include "CameraGroup.hxx" + +using namespace flightgear; //////////////////////////////////////////////////////////////////////// // Implementation of FGViewer. @@ -81,7 +83,8 @@ FGViewer::FGViewer( fgViewType Type, bool from_model, int from_model_index, _damp_heading(0), _scaling_type(FG_SCALING_MAX), _location(0), - _target_location(0) + _target_location(0), + _cameraGroup(CameraGroup::getDefault()) { _absolute_view_pos = SGVec3d(0, 0, 0); _type = Type; @@ -764,5 +767,7 @@ FGViewer::update (double dt) } } } - + recalc(); + _cameraGroup->update(_absolute_view_pos.osg(), mViewOrientation.osg()); + _cameraGroup->setCameraParameters(get_v_fov(), get_aspect_ratio()); }