]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/HUD/HUD.hxx
Add support for a back-course mode. Nothing changes visualy, but this
[flightgear.git] / src / Instrumentation / HUD / HUD.hxx
index 5b0142abbe9d2b4d1fa5068619890aeceb2c8e47..1a6a72a0ce97b99daddc61b6575cea3dbded6df5 100644 (file)
@@ -204,10 +204,6 @@ public:
         float x, y;
     } Point;
 
-    typedef struct {
-        float top, bottom, left, right;
-    } Rect;
-
     // called from Main/renderer.cxx to draw 2D and 3D HUD
     void draw();
 
@@ -377,16 +373,10 @@ public:
     virtual bool isEnabled();
 
 protected:
-    inline Rect  get_location()   const { return _scrn_pos; }
     inline float get_span()       const { return _scr_span; }
     inline Point get_centroid()   const { return _mid_span; }
     inline int   get_digits()     const { return _digits; }
 
-    inline float get_x()      const { return _scrn_pos.left; }
-    inline float get_y()      const { return _scrn_pos.top; }
-    inline float get_width()  const { return _scrn_pos.right; }
-    inline float get_height() const { return _scrn_pos.bottom; }
-
     inline bool option_vert()    const { return (_options & VERT) == VERT; }
     inline bool option_left()    const { return (_options & LEFT) == LEFT; }
     inline bool option_right()   const { return (_options & RIGHT) == RIGHT; }
@@ -406,11 +396,10 @@ protected:
     HUD         *_hud;
     string      _name;
     int         _options;
+    float       _x, _y, _w, _h;
 
 private:
     SGCondition *_condition;
-    Rect        _scrn_pos;      // Framing - affects scale dimensions
-                                // and orientation. Vert vs Horz, etc.
     float       _disp_factor;   // Multiply by to get numbers shown on scale.
     float       _scr_span;      // Working values for draw;
     Point       _mid_span;
@@ -468,18 +457,17 @@ public:
     virtual void draw    ( void ) {}  // No-op here. Defined in derived classes.
 
 protected:
-    inline unsigned int modulo() const { return _modulo; }
     inline float factor() const { return _display_factor; }
     inline float range_to_show() const { return _range_shown; }
 
     Input _input;
-    unsigned int _major_divs;  // major division marker units
-    unsigned int _minor_divs;  // minor division marker units
+    float _major_divs;      // major division marker units
+    float _minor_divs;      // minor division marker units
+    unsigned int _modulo;   // Roll over point
 
 private:
     float _range_shown;     // Width Units.
     float _display_factor;  // factor => screen units/range values.
-    unsigned int _modulo;   // Roll over point
 };
 
 
@@ -573,12 +561,11 @@ private:
         _locStippleLineList.add(LineSegment(x1, y1, x2, y2));
     }
 
+    enum   Type { PITCH, CLIMB_DIVE } _type;
     Input  _pitch;
     Input  _roll;
-    enum Type { PITCH, CLIMB_DIVE } _type;
-    float _width_units;
-    int    div_units;
-    unsigned int label_pos;
+    float  _width_units;
+    int    _div_units;
     unsigned int _scr_hole;
     float  _vmax;
     float  _vmin;
@@ -639,7 +626,7 @@ private:
     unsigned short _stipple_center; // stipple pattern of the center line of the runway
     bool   _draw_arrow;             // draw arrow when runway is not visible in HUD
     bool   _draw_arrow_always;      // always draws arrow
-    Rect   _location;
+    float  _left, _right, _top, _bottom;
     Point  _center;
 };