X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FMain%2Fviewmgr.hxx;h=9cccf8c5f555e27c119eabe883121e7780275e94;hb=f6e80608797fa9ab9d44444eb7b031e412b83067;hp=6e9b76298a9e02bee181dfaabec203af0951bc43;hpb=45d64bef95586a46ce8e0421706fa1a32ca6769a;p=flightgear.git diff --git a/src/Main/viewmgr.hxx b/src/Main/viewmgr.hxx index 6e9b76298..9cccf8c5f 100644 --- a/src/Main/viewmgr.hxx +++ b/src/Main/viewmgr.hxx @@ -39,8 +39,7 @@ #include #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);