]> git.mxchange.org Git - flightgear.git/blobdiff - src/Model/acmodel.hxx
Fix starting on carrier.
[flightgear.git] / src / Model / acmodel.hxx
index cf337bd5e20e100ce2a5c0aa99636aa996317f0b..edaaad77cbda801aa658aa43ac96a959fbafadb4 100644 (file)
@@ -1,4 +1,4 @@
-// model.hxx - manage a 3D aircraft model.
+// acmodel.hxx - manage a 3D aircraft model.
 // Written by David Megginson, started 2002.
 //
 // This file is in the Public Domain, and comes with no warranty.
@@ -6,23 +6,17 @@
 #ifndef __ACMODEL_HXX
 #define __ACMODEL_HXX 1
 
-#ifndef __cplusplus
-# error This library requires C++
-#endif
-
-#include <vector>
-
-SG_USING_STD(string);
-SG_USING_STD(vector);
+#include <osg/ref_ptr>
+#include <osg/Group>
+#include <osg/Switch>
 
+#include <memory>
 #include <simgear/structure/subsystem_mgr.hxx> // for SGSubsystem
 
 
 // Don't pull in the headers, since we don't need them here.
-class ssgRoot;
-class ssgSelector;
 class SGModelPlacement;
-
+class FGFX;
 
 class FGAircraftModel : public SGSubsystem
 {
@@ -32,20 +26,26 @@ public:
   virtual ~FGAircraftModel ();
 
   virtual void init ();
+  virtual void shutdown ();
+  virtual void reinit ();
   virtual void bind ();
   virtual void unbind ();
   virtual void update (double dt);
-  virtual void draw ();
-  virtual SGModelPlacement * get3DModel() { return _aircraft; }
+  virtual SGModelPlacement * get3DModel() { return _aircraft.get(); }
+  virtual SGVec3d& getVelocity() { return _velocity; }
 
 private:
-
-  SGModelPlacement * _aircraft;
-  ssgSelector * _selector;
-  ssgRoot * _scene;
-  float _nearplane;
-  float _farplane;
-
+  void deinit ();
+  
+    std::auto_ptr<SGModelPlacement> _aircraft;
+    std::auto_ptr<SGModelPlacement> _interior;
+    
+  SGVec3d _velocity;
+  SGSharedPtr<FGFX>  _fx;
+
+  SGPropertyNode_ptr _speed_n;
+  SGPropertyNode_ptr _speed_e;
+  SGPropertyNode_ptr _speed_d;
 };
 
 #endif // __ACMODEL_HXX