]> git.mxchange.org Git - flightgear.git/blobdiff - src/Model/acmodel.hxx
Fix starting on carrier.
[flightgear.git] / src / Model / acmodel.hxx
index 7965658cd719b682815b36773dd3b290efe63eda..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.
@@ -10,6 +10,7 @@
 #include <osg/Group>
 #include <osg/Switch>
 
+#include <memory>
 #include <simgear/structure/subsystem_mgr.hxx> // for SGSubsystem
 
 
@@ -25,26 +26,23 @@ public:
   virtual ~FGAircraftModel ();
 
   virtual void init ();
+  virtual void shutdown ();
   virtual void reinit ();
   virtual void bind ();
   virtual void unbind ();
   virtual void update (double dt);
-  virtual SGModelPlacement * get3DModel() { return _aircraft; }
+  virtual SGModelPlacement * get3DModel() { return _aircraft.get(); }
   virtual SGVec3d& getVelocity() { return _velocity; }
 
 private:
   void deinit ();
   
-  SGModelPlacement * _aircraft;
+    std::auto_ptr<SGModelPlacement> _aircraft;
+    std::auto_ptr<SGModelPlacement> _interior;
+    
   SGVec3d _velocity;
   SGSharedPtr<FGFX>  _fx;
 
-  SGPropertyNode_ptr _lon;
-  SGPropertyNode_ptr _lat;
-  SGPropertyNode_ptr _alt;
-  SGPropertyNode_ptr _pitch;
-  SGPropertyNode_ptr _roll;
-  SGPropertyNode_ptr _heading;
   SGPropertyNode_ptr _speed_n;
   SGPropertyNode_ptr _speed_e;
   SGPropertyNode_ptr _speed_d;