X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FMain%2Fviewmgr.hxx;h=9cccf8c5f555e27c119eabe883121e7780275e94;hb=f6e80608797fa9ab9d44444eb7b031e412b83067;hp=fec031cf574d1080e8a18a2bdccfd2b7fd5a525c;hpb=4d4cd1601205be27e12c0748e6eda5b8beed0dc8;p=flightgear.git diff --git a/src/Main/viewmgr.hxx b/src/Main/viewmgr.hxx index fec031cf5..9cccf8c5f 100644 --- a/src/Main/viewmgr.hxx +++ b/src/Main/viewmgr.hxx @@ -59,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(); } @@ -93,6 +93,7 @@ public: if ( current >= (int)views.size() ) { current = 0; } + copyToCurrent(); return views[current]; } inline FGViewer *prev_view() { @@ -106,11 +107,12 @@ public: // setters inline void clear() { views.clear(); } inline void set_view( const int v ) { current = v; } - inline void add_view( FGViewer * v, int type ) { + inline void add_view( FGViewer * v ) { views.push_back(v); - v->setType(type); v->init(); } + // copies current offset settings to current-view path... + void copyToCurrent (); private: @@ -135,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); @@ -147,7 +151,3 @@ private: #endif // _VIEWMGR_HXX - - - -