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