]> git.mxchange.org Git - flightgear.git/blob - src/GUI/sgVec3Slider.hxx
Patch from Andy Ross:
[flightgear.git] / src / GUI / sgVec3Slider.hxx
1 #ifndef _VEC3_SLIDER_H
2 #define  _VEC3_SLIDER_H
3
4 #ifdef HAVE_CONFIG_H
5 #include <config.h>
6 #endif
7
8 #include <simgear/compiler.h>
9
10 #ifdef HAVE_WINDOWS_H
11 #include <windows.h>
12 #endif
13
14 #include <stdio.h>
15 #include "gui.h"
16
17 void PilotOffsetInit();
18 void PilotOffsetInit( sgVec3 vec );
19 void PilotOffsetAdjust( puObject * );
20 void Vec3FromHeadingPitchRadius( sgVec3 vec3, float heading, float pitch, float radius );
21 //void PilotOffsetGet( float *po );
22 sgVec3 *PilotOffsetGet();
23 void PilotOffsetSet( int opt, float setting);
24 float PilotOffsetGetSetting( int opt );
25
26 #endif // _VEC3_SLIDER_H
27
28 /* binding functions for chase view offset */
29
30 static void
31 setPilotOffsetHeadingDeg (float value)
32 {
33         PilotOffsetSet(0, value);
34 }
35
36 static float
37 getPilotOffsetHeadingDeg ()
38 {
39         return( PilotOffsetGetSetting(0) );
40 }
41
42
43 static void
44 setPilotOffsetPitchDeg (float value)
45 {
46         PilotOffsetSet(1, value);
47 }
48
49 static float
50 getPilotOffsetPitchDeg ()
51 {
52         return( PilotOffsetGetSetting(1) );
53 }
54
55
56 static void
57 setPilotOffsetRadiusM (float value)
58 {
59         PilotOffsetSet(2, value);
60 }
61
62 static float
63 getPilotOffsetRadiusM ()
64 {
65         return( PilotOffsetGetSetting(2) );
66 }
67