]> git.mxchange.org Git - flightgear.git/blob - src/Model/acmodel.hxx
I have added Aaron Wilson's virtual 3d runway projection to the HUD.
[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
15 SG_USING_STD(string);
16 SG_USING_STD(vector);
17
18 #include <simgear/structure/subsystem_mgr.hxx>  // for SGSubsystem
19
20
21 // Don't pull in the headers, since we don't need them here.
22 class ssgRoot;
23 class ssgSelector;
24 class SGModelPlacement;
25
26
27 class FGAircraftModel : public SGSubsystem
28 {
29 public:
30
31   FGAircraftModel ();
32   virtual ~FGAircraftModel ();
33
34   virtual void init ();
35   virtual void bind ();
36   virtual void unbind ();
37   virtual void update (double dt);
38   virtual void draw ();
39   virtual SGModelPlacement * get3DModel() { return _aircraft; }
40   void select( bool s ) { _selector->select( s ? 0xffffffff : 0 ); }
41
42 private:
43
44   SGModelPlacement * _aircraft;
45   ssgSelector * _selector;
46   ssgRoot * _scene;
47   float _nearplane;
48   float _farplane;
49
50 };
51
52 #endif // __ACMODEL_HXX