]> git.mxchange.org Git - flightgear.git/blob - src/Model/acmodel.hxx
Avoid a segfault when a named object is not found for an animation.
[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 <Main/fgfs.hxx>        // for FGSubsystem
19
20
21 // Don't pull in the headers, since we don't need them here.
22 class ssgRoot;
23 class ssgSelector;
24 class FGModelPlacement;
25
26
27 class FGAircraftModel : public FGSubsystem
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 FGModelPlacement * get3DModel() { return _aircraft; }
40
41 private:
42
43   FGModelPlacement * _aircraft;
44   ssgSelector * _selector;
45   ssgRoot * _scene;
46   float _nearplane;
47   float _farplane;
48
49 };
50
51 #endif // __ACMODEL_HXX