10 #include <Aircraft/aircraft.hxx>
11 #include <Debug/fg_debug.h>
12 #include <Include/fg_constants.h>
13 #include <Math/fg_random.h>
14 #include <Math/mat3.h>
15 #include <Math/polar3d.hxx>
16 #include <Scenery/scenery.hxx>
17 #include <Time/fg_timer.hxx>
21 //============== Top of instr_scale class memeber definitions ===============
24 // 1. instr_scales divide the specified location into half and then
25 // the half opposite the read direction in half again. A bar is
26 // then drawn along the second divider. Scale ticks are drawn
27 // between the middle and quarter section lines (minor division
28 // markers) or just over the middle line.
30 // 2. This class was not intended to be instanciated. See moving_scale
31 // and guage_instr classes.
32 //============================================================================
49 instr_item( x, y, width, height,
50 load_fn, disp_scale, options, working),
51 range_shown ( show_range ),
52 Maximum_value( maxValue ),
53 Minimum_value( minValue ),
54 Maj_div ( major_divs ),
55 Min_div ( minor_divs ),
57 signif_digits( dp_showing )
61 scale_factor = (double)get_span() / range_shown;
62 if( show_range < 0 ) {
63 range_shown = -range_shown;
65 temp = (Maximum_value - Minimum_value) / 100;
66 if( range_shown < temp ) {
72 instr_scale( const instr_scale & image ) :
73 instr_item( (const instr_item &) image),
74 range_shown ( image.range_shown ),
75 Maximum_value( image.Maximum_value ),
76 Minimum_value( image.Minimum_value ),
77 scale_factor ( image.scale_factor ),
78 Maj_div ( image.Maj_div ),
79 Min_div ( image.Min_div ),
80 Modulo ( image.Modulo ),
81 signif_digits( image.signif_digits )
85 instr_scale & instr_scale :: operator = (const instr_scale & rhs )
87 if( !(this == &rhs)) {
88 instr_item::operator = (rhs);
89 range_shown = rhs.range_shown;
90 scale_factor = rhs.scale_factor;
91 Maximum_value = rhs.Maximum_value;
92 Minimum_value = rhs.Minimum_value;
93 Maj_div = rhs.Maj_div;
94 Min_div = rhs.Min_div;
96 signif_digits = rhs.signif_digits;
101 instr_scale :: ~ instr_scale () {}