]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/viewmgr.hxx
A couple ADF needle direction tweaks.
[flightgear.git] / src / Main / viewmgr.hxx
index 6e9b76298a9e02bee181dfaabec203af0951bc43..9cccf8c5f555e27c119eabe883121e7780275e94 100644 (file)
@@ -39,8 +39,7 @@
 #include <vector>
 
 #include "fgfs.hxx"
-#include "viewer_lookat.hxx"
-#include "viewer_rph.hxx"
+#include "viewer.hxx"
 
 SG_USING_STD(vector);
 
@@ -60,7 +59,7 @@ public:
     virtual void init ();
     virtual void bind ();
     virtual void unbind ();
-    virtual void update (int dt);
+    virtual void update (double dt);
 
     // getters
     inline int size() const { return views.size(); }
@@ -94,6 +93,7 @@ public:
        if ( current >= (int)views.size() ) {
            current = 0;
        }
+        copyToCurrent();
        return views[current];
     }
     inline FGViewer *prev_view() {
@@ -109,7 +109,10 @@ public:
     inline void set_view( const int v ) { current = v; }
     inline void add_view( FGViewer * v ) {
        views.push_back(v);
+        v->init();
     }
+    // copies current offset settings to current-view path...
+    void copyToCurrent ();
 
 private:
 
@@ -134,6 +137,8 @@ private:
     void setPilotZOffset_m (double z);
     double getFOV_deg () const;
     void setFOV_deg (double fov);
+    double getNear_m () const;
+    void setNear_m (double near_m);
     void setViewAxisLong (double axis);
     void setViewAxisLat (double axis);