]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/HUD/HUD.hxx
Merge branch 'maint2' into next
[flightgear.git] / src / Instrumentation / HUD / HUD.hxx
index 11303452953713ae6987b9b2fcb8363adbc902b3..c1a0e21a0a3b422d9acf69fb531969ef5edeaadf 100644 (file)
@@ -54,6 +54,27 @@ using std::vector;
 class FGViewer;
 
 
+class ClipBox {
+public:
+    ClipBox(const SGPropertyNode *, float xoffset = 0, float yoffset = 0);
+    void set();
+    void unset();
+
+private:
+    bool _active;
+    float _xoffs, _yoffs;
+    SGConstPropertyNode_ptr _top_node;
+    SGConstPropertyNode_ptr _bot_node;
+    SGConstPropertyNode_ptr _left_node;
+    SGConstPropertyNode_ptr _right_node;
+    GLdouble _top[4];
+    GLdouble _bot[4];
+    GLdouble _left[4];
+    GLdouble _right[4];
+};
+
+
+
 class LineSegment {
 public:
     LineSegment(GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1)
@@ -192,6 +213,7 @@ private:
     class AimingReticle;
 
     deque<Item *> _items;
+    deque<Item *> _ladders;
 
     SGPropertyNode_ptr _current;
     SGPropertyNode_ptr _visibility;
@@ -219,6 +241,7 @@ private:
     float _font_size;
     int _style;
 
+    ClipBox *_clip_box;
     TextList _text_list;
     LineList _line_list;
     LineList _stipple_line_list;
@@ -486,6 +509,7 @@ private:
 class HUD::Ladder : public Item {
 public:
     Ladder(HUD *parent, const SGPropertyNode *, float x, float y);
+    ~Ladder();
     virtual void draw();
 
 private:
@@ -516,7 +540,6 @@ private:
     float  _vmin;
     float  _compression;
     bool   _dynamic_origin;
-    bool   _clip_plane;
     bool   _frl;               // fuselage reference line
     bool   _target_spot;
     bool   _target_markers;
@@ -533,6 +556,7 @@ private:
     bool   _nadir;
     bool   _hat;
 
+    ClipBox *_clip_box;
     // The Ladder has its own temporary display lists
     TextList _locTextList;
     LineList _locLineList;
@@ -553,7 +577,7 @@ private:
     bool boundOutsidePoints(sgdVec3& v, sgdVec3& m);
     bool drawLine(const sgdVec3& a1, const sgdVec3& a2, const sgdVec3& p1, const sgdVec3& p2);
     void drawArrow();
-    bool get_active_runway(FGRunway& rwy);
+    FGRunway* get_active_runway();
     void get_rwy_points(sgdVec3 *points);
     void setLineWidth();
 
@@ -568,7 +592,7 @@ private:
     double _default_pitch;
     double _default_heading;
     GLint  _view[4];
-    FGRunway _runway;
+    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
@@ -591,5 +615,4 @@ private:
 };
 
 
-
 #endif // _HUD_HXX