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)
class AimingReticle;
deque<Item *> _items;
+ deque<Item *> _ladders;
SGPropertyNode_ptr _current;
SGPropertyNode_ptr _visibility;
float _font_size;
int _style;
+ ClipBox *_clip_box;
TextList _text_list;
LineList _line_list;
LineList _stipple_line_list;
void draw_line(float x1, float y1, float x2, float y2);
void draw_stipple_line(float x1, float y1, float x2, float y2);
- void draw_text(float x, float y, char *msg, int align = 0, int digit = 0);
+ 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_bullet(float, float, float);
class HUD::Ladder : public Item {
public:
Ladder(HUD *parent, const SGPropertyNode *, float x, float y);
+ ~Ladder();
virtual void draw();
private:
void draw_zenith(float, float);
void draw_nadir(float, float);
- void draw_text(float x, float y, char *s, int align = 0) {
+ void draw_text(float x, float y, const char *s, int align = 0) {
_locTextList.add(x, y, s, align, 0);
}
- void draw_line(float x1, float y1, float x2, float y2) {
- _locLineList.add(LineSegment(x1, y1, x2, y2));
- }
-
- void draw_stipple_line(float x1, float y1, float x2, float y2) {
- _locStippleLineList.add(LineSegment(x1, y1, x2, y2));
+ void draw_line(float x1, float y1, float x2, float y2, bool stipple = false) {
+ if (stipple)
+ _locStippleLineList.add(LineSegment(x1, y1, x2, y2));
+ else
+ _locLineList.add(LineSegment(x1, y1, x2, y2));
}
enum Type { PITCH, CLIMB_DIVE } _type;
Input _roll;
float _width_units;
int _div_units;
- unsigned int _scr_hole;
+ float _scr_hole;
+ float _zero_bar_overlength;
+ bool _dive_bar_angle;
+ float _tick_length;
float _vmax;
float _vmin;
float _compression;
bool _dynamic_origin;
- bool _clip_plane;
bool _frl; // fuselage reference line
bool _target_spot;
bool _target_markers;
bool _nadir;
bool _hat;
+ ClipBox *_clip_box;
// The Ladder has its own temporary display lists
TextList _locTextList;
LineList _locLineList;
};
-
#endif // _HUD_HXX