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