]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/HUD/HUD.hxx
Remove remaining use of fabsf() from the code, avoid an OSG header issue on OS-X.
[flightgear.git] / src / Instrumentation / HUD / HUD.hxx
index c1a0e21a0a3b422d9acf69fb531969ef5edeaadf..0ac07389e2e46fbb42a7a5c598aaa591610f68db 100644 (file)
@@ -38,8 +38,6 @@ using std::vector;
 
 #include <osg/State>
 
-#include <plib/sg.h>
-
 #include <simgear/math/SGLimits.hxx>
 #include <simgear/constants.h>
 #include <simgear/structure/subsystem_mgr.hxx>
@@ -155,6 +153,8 @@ public:
     void init();
     void update(double);
 
+  void reinit();
+
     // called from Main/renderer.cxx to draw 2D and 3D HUD
     void draw(osg::State&);
 
@@ -197,9 +197,13 @@ protected:
             int level = 0, const std::string& indent = "");
 
 private:
+    void deinit();
+    
     void draw3D();
     void draw2D(GLfloat, GLfloat, GLfloat, GLfloat);
 
+    void currentColorChanged();
+    
     class Input;
     class Item;
     class Label;
@@ -215,6 +219,7 @@ private:
     deque<Item *> _items;
     deque<Item *> _ladders;
 
+    SGPropertyNode_ptr _path;
     SGPropertyNode_ptr _current;
     SGPropertyNode_ptr _visibility;
     SGPropertyNode_ptr _3DenabledN;
@@ -240,6 +245,7 @@ private:
     fntTexFont *_font;
     float _font_size;
     int _style;
+    bool _listener_active;
 
     ClipBox *_clip_box;
     TextList _text_list;
@@ -263,7 +269,7 @@ public:
         _offset = n->getFloatValue("offset", offset);
         _min = n->getFloatValue("min", min);
         _max = n->getFloatValue("max", max);
-        _coeff = 1.0 - 1.0 / powf(10, fabsf(n->getFloatValue("damp", 0.0)));
+        _coeff = 1.0 - 1.0 / powf(10, fabs(n->getFloatValue("damp", 0.0)));
         SGPropertyNode *p = ((SGPropertyNode *)n)->getNode("property", false);
         if (p) {
             const char *path = p->getStringValue();
@@ -357,6 +363,7 @@ protected:
     void draw_stipple_line(float x1, float y1, float x2, float y2);
     void draw_text(float x, float y, const char *msg, int align = 0, int digit = 0);
     void draw_circle(float x1, float y1, float r) const;
+    void draw_arc(float x1, float y1, float t0, float t1, float r) const;
     void draw_bullet(float, float, float);
 
     HUD         *_hud;
@@ -457,6 +464,7 @@ private:
     bool   _draw_cap_right;
     bool   _draw_cap_left;
     float  _marker_offset;
+    float  _label_offset;
     float  _label_gap;
     bool   _pointer;
     Format _label_fmt;
@@ -593,7 +601,6 @@ private:
     double _default_heading;
     GLint  _view[4];
     FGRunway* _runway;
-    FGViewer* _cockpit_view;
     unsigned short _stipple_out;    // stipple pattern of the outline of the runway
     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
@@ -609,9 +616,25 @@ public:
 
 private:
     SGSharedPtr<SGCondition> _active_condition;  // stadiametric (true) or standby (false)
+    SGSharedPtr<SGCondition> _tachy_condition;  // tachymetric (true) or standby (false)
+    SGSharedPtr<SGCondition> _align_condition;  // tachymetric (true) or standby (false)
+
     Input   _diameter;               // inner/outer radius relation
+    Input  _pitch;
+    Input  _yaw;
+    Input  _speed;
+    Input  _range;
+    Input  _t0;
+    Input  _t1;
+    Input  _offset_x;
+    Input  _offset_y;
+
     float   _bullet_size;
     float   _inner_radius;
+    float   _compression;
+    float  _limit_x;
+    float  _limit_y;
+
 };