]> git.mxchange.org Git - flightgear.git/blob - src/Model/modelmgr.hxx
Solve for the elevator control input during approach. It turns out that
[flightgear.git] / src / Model / modelmgr.hxx
1 // model-mgr.hxx - manage user-specified 3D models.
2 // Written by David Megginson, started 2002.
3 //
4 // This file is in the Public Domain, and comes with no warranty.
5
6 #ifndef __MODELMGR_HXX
7 #define __MODELMGR_HXX 1
8
9 #ifndef __cplusplus
10 # error This library requires C++
11 #endif
12
13 #include <vector>
14
15 #include <simgear/compiler.h>   // for SG_USING_STD
16
17 #include <Main/fgfs.hxx>        // for FGSubsystem
18
19 SG_USING_STD(vector);
20
21 // Don't pull in headers, since we don't need them here.
22 class ssgSelector;
23 class SGPropertyNode;
24 class FG3DModel;
25
26
27 /**
28  * Manage a list of user-specified models.
29  */
30 class FGModelMgr : public FGSubsystem
31 {
32 public:
33   FGModelMgr ();
34   virtual ~FGModelMgr ();
35
36   virtual void init ();
37   virtual void bind ();
38   virtual void unbind ();
39   virtual void update (double dt);
40
41   virtual void draw ();
42
43 private:
44
45   struct Instance
46   {
47     Instance ();
48     virtual ~Instance ();
49     FG3DModel * model;
50     SGPropertyNode * lon_deg_node;
51     SGPropertyNode * lat_deg_node;
52     SGPropertyNode * elev_ft_node;
53     SGPropertyNode * roll_deg_node;
54     SGPropertyNode * pitch_deg_node;
55     SGPropertyNode * heading_deg_node;
56   };
57
58   vector<Instance *> _instances;
59
60   ssgSelector * _selector;
61
62 };
63
64 #endif // __MODELMGR_HXX