]> git.mxchange.org Git - flightgear.git/blob - src/Model/acmodel.hxx
Commit the current state of affairs to see if it fixes the position code for others
[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 SGVec3f& getVelocity() { return _velocity; }
43
44 private:
45
46   SGModelPlacement * _aircraft;
47   SGVec3f _velocity;
48   SGSharedPtr<FGFX>  _fx;
49
50   SGPropertyNode_ptr _lon;
51   SGPropertyNode_ptr _lat;
52   SGPropertyNode_ptr _alt;
53   SGPropertyNode_ptr _pitch;
54   SGPropertyNode_ptr _roll;
55   SGPropertyNode_ptr _heading;
56   SGPropertyNode_ptr _speed_n;
57   SGPropertyNode_ptr _speed_e;
58   SGPropertyNode_ptr _speed_d;
59 };
60
61 #endif // __ACMODEL_HXX