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