]> git.mxchange.org Git - flightgear.git/blobdiff - src/Model/acmodel.hxx
Add aubmodels to AI objects
[flightgear.git] / src / Model / acmodel.hxx
index dd6e3b01f705bbcc74fd1f45e94cbcf71b435a6d..7965658cd719b682815b36773dd3b290efe63eda 100644 (file)
@@ -6,16 +6,6 @@
 #ifndef __ACMODEL_HXX
 #define __ACMODEL_HXX 1
 
-#ifndef __cplusplus
-# error This library requires C++
-#endif
-
-#include <vector>
-#include <string>
-
-using std::string;
-using std::vector;
-
 #include <osg/ref_ptr>
 #include <osg/Group>
 #include <osg/Switch>
@@ -35,26 +25,29 @@ public:
   virtual ~FGAircraftModel ();
 
   virtual void init ();
+  virtual void reinit ();
   virtual void bind ();
   virtual void unbind ();
   virtual void update (double dt);
   virtual SGModelPlacement * get3DModel() { return _aircraft; }
-  virtual SGVec3f getVelocity() { return _velocity; }
+  virtual SGVec3d& getVelocity() { return _velocity; }
 
 private:
-
+  void deinit ();
+  
   SGModelPlacement * _aircraft;
-  SGVec3f _velocity;
-  FGFX * _fx;
-
-  SGPropertyNode * _lon;
-  SGPropertyNode * _lat;
-  SGPropertyNode * _alt;
-  SGPropertyNode * _pitch;
-  SGPropertyNode * _roll;
-  SGPropertyNode * _heading;
-  SGPropertyNode * _speed;
-
+  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;
 };
 
 #endif // __ACMODEL_HXX