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>
18 #include <Weather/weather.h>
22 //============== Top of instr_scale class memeber definitions ===============
25 // 1. instr_scales divide the specified location into half and then
26 // the half opposite the read direction in half again. A bar is
27 // then drawn along the second divider. Scale ticks are drawn
28 // between the middle and quarter section lines (minor division
29 // markers) or just over the middle line.
31 // 2. This class was not intended to be instanciated. See moving_scale
32 // and guage_instr classes.
33 //============================================================================
50 instr_item( x, y, width, height,
51 load_fn, disp_scale, options, working),
52 range_shown ( show_range ),
53 Maximum_value( maxValue ),
54 Minimum_value( minValue ),
55 Maj_div ( major_divs ),
56 Min_div ( minor_divs ),
58 signif_digits( dp_showing )
62 scale_factor = (double)get_span() / range_shown;
63 if( show_range < 0 ) {
64 range_shown = -range_shown;
66 temp = (Maximum_value - Minimum_value) / 100;
67 if( range_shown < temp ) {
73 instr_scale( const instr_scale & image ) :
74 instr_item( (const instr_item &) image),
75 range_shown ( image.range_shown ),
76 Maximum_value( image.Maximum_value ),
77 Minimum_value( image.Minimum_value ),
78 scale_factor ( image.scale_factor ),
79 Maj_div ( image.Maj_div ),
80 Min_div ( image.Min_div ),
81 Modulo ( image.Modulo ),
82 signif_digits( image.signif_digits )
86 instr_scale & instr_scale :: operator = (const instr_scale & rhs )
88 if( !(this == &rhs)) {
89 instr_item::operator = (rhs);
90 range_shown = rhs.range_shown;
91 scale_factor = rhs.scale_factor;
92 Maximum_value = rhs.Maximum_value;
93 Minimum_value = rhs.Minimum_value;
94 Maj_div = rhs.Maj_div;
95 Min_div = rhs.Min_div;
97 signif_digits = rhs.signif_digits;
102 instr_scale :: ~ instr_scale () {}