]> git.mxchange.org Git - flightgear.git/blob - src/Model/acmodel.hxx
move some of the sound postion and orientation calculations over to the sample class...
[flightgear.git] / src / Model / acmodel.hxx
1 // model.hxx - manage a 3D aircraft model.
2 // Written by David Megginson, started 2002.
3 //
4 // This file is in the Public Domain, and comes with no warranty.
5
6 #ifndef __ACMODEL_HXX
7 #define __ACMODEL_HXX 1
8
9 #ifndef __cplusplus
10 # error This library requires C++
11 #endif
12
13 #include <vector>
14 #include <string>
15
16 using std::string;
17 using std::vector;
18
19 #include <osg/ref_ptr>
20 #include <osg/Group>
21 #include <osg/Switch>
22
23 #include <simgear/structure/subsystem_mgr.hxx>  // for SGSubsystem
24
25
26 // Don't pull in the headers, since we don't need them here.
27 class SGModelPlacement;
28 class FGFX;
29
30 class FGAircraftModel : public SGSubsystem
31 {
32 public:
33
34   FGAircraftModel ();
35   virtual ~FGAircraftModel ();
36
37   virtual void init ();
38   virtual void bind ();
39   virtual void unbind ();
40   virtual void update (double dt);
41   virtual SGModelPlacement * get3DModel() { return _aircraft; }
42   virtual SGVec3d getVelocity() { return _velocity; }
43
44 private:
45
46   SGModelPlacement * _aircraft;
47   SGVec3d _velocity;
48   FGFX * _fx;
49
50   SGPropertyNode * _lon;
51   SGPropertyNode * _lat;
52   SGPropertyNode * _alt;
53   SGPropertyNode * _pitch;
54   SGPropertyNode * _roll;
55   SGPropertyNode * _heading;
56   SGPropertyNode * _speed_n;
57   SGPropertyNode * _speed_e;
58   SGPropertyNode * _speed_d;
59 };
60
61 #endif // __ACMODEL_HXX