]> git.mxchange.org Git - flightgear.git/blob - src/Model/acmodel.hxx
Merge commit 'refs/merge-requests/1551' of git://gitorious.org/fg/flightgear into...
[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 #include <osg/ref_ptr>
10 #include <osg/Group>
11 #include <osg/Switch>
12
13 #include <simgear/structure/subsystem_mgr.hxx>  // for SGSubsystem
14
15
16 // Don't pull in the headers, since we don't need them here.
17 class SGModelPlacement;
18 class FGFX;
19
20 class FGAircraftModel : public SGSubsystem
21 {
22 public:
23
24   FGAircraftModel ();
25   virtual ~FGAircraftModel ();
26
27   virtual void init ();
28   virtual void reinit ();
29   virtual void bind ();
30   virtual void unbind ();
31   virtual void update (double dt);
32   virtual SGModelPlacement * get3DModel() { return _aircraft; }
33   virtual SGVec3d& getVelocity() { return _velocity; }
34
35 private:
36   void deinit ();
37   
38   SGModelPlacement * _aircraft;
39   SGVec3d _velocity;
40   SGSharedPtr<FGFX>  _fx;
41
42   SGPropertyNode_ptr _lon;
43   SGPropertyNode_ptr _lat;
44   SGPropertyNode_ptr _alt;
45   SGPropertyNode_ptr _pitch;
46   SGPropertyNode_ptr _roll;
47   SGPropertyNode_ptr _heading;
48   SGPropertyNode_ptr _speed_n;
49   SGPropertyNode_ptr _speed_e;
50   SGPropertyNode_ptr _speed_d;
51 };
52
53 #endif // __ACMODEL_HXX