]> git.mxchange.org Git - flightgear.git/blob - src/Model/acmodel.hxx
Close dialogs on GUI shutdown
[flightgear.git] / src / Model / acmodel.hxx
1 // acmodel.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 <memory>
14 #include <simgear/structure/subsystem_mgr.hxx>  // for SGSubsystem
15
16
17 // Don't pull in the headers, since we don't need them here.
18 class SGModelPlacement;
19 class FGFX;
20
21 class FGAircraftModel : public SGSubsystem
22 {
23 public:
24
25   FGAircraftModel ();
26   virtual ~FGAircraftModel ();
27
28   virtual void init ();
29   virtual void shutdown ();
30   virtual void reinit ();
31   virtual void bind ();
32   virtual void unbind ();
33   virtual void update (double dt);
34   virtual SGModelPlacement * get3DModel() { return _aircraft.get(); }
35   virtual SGVec3d& getVelocity() { return _velocity; }
36
37 private:
38   void deinit ();
39   
40     std::auto_ptr<SGModelPlacement> _aircraft;
41     std::auto_ptr<SGModelPlacement> _interior;
42     
43   SGVec3d _velocity;
44   SGSharedPtr<FGFX>  _fx;
45
46   SGPropertyNode_ptr _speed_n;
47   SGPropertyNode_ptr _speed_e;
48   SGPropertyNode_ptr _speed_d;
49 };
50
51 #endif // __ACMODEL_HXX