]> git.mxchange.org Git - flightgear.git/commitdiff
Move FOV property into View
authorJames Turner <zakalawe@mac.com>
Thu, 21 Jan 2016 02:14:58 +0000 (21:14 -0500)
committerJames Turner <zakalawe@mac.com>
Wed, 17 Feb 2016 21:25:39 +0000 (21:25 +0000)
src/Viewer/viewer.cxx
src/Viewer/viewmgr.cxx
src/Viewer/viewmgr.hxx

index 0a710fac9b7227ef4825a87d54db2066e6949ac4..1421ab652ce6cbaafabef4cef6935210bf824043 100644 (file)
@@ -249,6 +249,11 @@ View::bind ()
                         false /* do not set current property value */);
     fgSetArchivable("/sim/current-view/goal-roll-offset-deg");
 
+
+    _tiedProperties.Tie("field-of-view", this,
+                        &View::get_fov, &View::set_fov);
+    fgSetArchivable("/sim/current-view/field-of-view");
+
 // expose various quaternions under the debug/ subtree
     _tiedProperties.Tie("debug/orientation-w", this, &View::getOrientation_w);
     _tiedProperties.Tie("debug/orientation-x", this, &View::getOrientation_x);
index 90891d04b0209deab99f80fb8a1a345ce33ab21e..ffe87bb0e066d6ab5b8e4bf11f842d3722367287 100644 (file)
@@ -147,10 +147,6 @@ FGViewMgr::do_bind()
                       (double_getter)0, &FGViewMgr::setViewAxisLat);
   fgSetArchivable("/sim/current-view/axes/lat");
 
-  _tiedProperties.Tie("field-of-view", this,
-                      &FGViewMgr::getFOV_deg, &FGViewMgr::setFOV_deg);
-  fgSetArchivable("/sim/current-view/field-of-view");
-
   _tiedProperties.Tie("aspect-ratio-multiplier", this,
                       &FGViewMgr::getARM_deg, &FGViewMgr::setARM_deg);
   fgSetArchivable("/sim/current-view/field-of-view");
@@ -446,22 +442,6 @@ FGViewMgr::setView (int newview)
     update(0.0);
 }
 
-
-double
-FGViewMgr::getFOV_deg () const
-{
-  const flightgear::View * view = get_current_view();
-  return (view == 0 ? 0 : view->get_fov());
-}
-
-void
-FGViewMgr::setFOV_deg (double fov)
-{
-  flightgear::View * view = get_current_view();
-  if (view != 0)
-    view->set_fov(fov);
-}
-
 double
 FGViewMgr::getARM_deg () const
 {
index 74b4acf08d60ee4fd996d4806e43e3b072379477..d17648d629d4c62939ff66f27db9b7950e8be027 100644 (file)
@@ -102,8 +102,7 @@ private:
     void setViewTargetYOffset_m (double y);
     double getViewTargetZOffset_m () const;
     void setViewTargetZOffset_m (double z);
-    double getFOV_deg () const;
-    void setFOV_deg (double fov);
+
     double getARM_deg () const; // Aspect Ratio Multiplier
     void setARM_deg (double fov);
     double getNear_m () const;