]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/model.hxx
Added a new 'delimiter' property to allow an alternative delimiter to
[flightgear.git] / src / Main / model.hxx
index ab2890585cc74cd79d6df2a42c1af7e03647edd6..ac23895c516ea2368399caa9b147337066914b61 100644 (file)
 # error This library requires C++
 #endif
 
+#include <string>
+#include <vector>
+
+SG_USING_STD(string);
+SG_USING_STD(vector);
+
 #include "fgfs.hxx"
+#include <simgear/misc/props.hxx>
 #include <simgear/timing/timestamp.hxx>
 
 class FGAircraftModel : public FGSubsystem
@@ -27,14 +34,42 @@ public:
 
 private:
 
-  ssgEntity * _object;
+  struct Animation
+  {
+    enum Type {
+      None,
+      Spin,
+      Rotate
+    };
+    string name;
+    Type type;
+    ssgTransform * transform;
+    sgMat4 matrix;
+    SGPropertyNode * prop;
+    float factor;
+    float offset;
+    float position;
+    bool has_min;
+    float min;
+    bool has_max;
+    float max;
+    sgVec3 center;
+    sgVec3 axis;
+    void setRotation ();
+  };
+
+  Animation read_animation (const string &object_name,
+                           const SGPropertyNode * node);
+  void do_animation (Animation &animation, long elapsed_ms);
+
+  ssgEntity * _model;
   ssgSelector * _selector;
   ssgTransform * _position;
 
   SGTimeStamp _last_timestamp;
   SGTimeStamp _current_timestamp;
 
-  ssgTransform * _prop_position;
+  vector<Animation> _animations;
 
 };