]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/YASim/Model.hpp
Port over remaining Point3D usage to the more type and unit safe SG* classes.
[flightgear.git] / src / FDM / YASim / Model.hpp
index 64f98ba263084b82500f59bd63acb165161ba78c..7c31b8ac8edc414ee24bae3426e1cf4e28e1cbd1 100644 (file)
@@ -6,6 +6,7 @@
 #include "BodyEnvironment.hpp"
 #include "Vector.hpp"
 #include "Turbulence.hpp"
+#include "Rotor.hpp"
 
 namespace yasim {
 
@@ -14,12 +15,11 @@ class Integrator;
 class Thruster;
 class Surface;
 class Rotorpart;
-class Rotorblade;
-class Rotor;
 class Gear;
 class Ground;
 class Hook;
 class Launchbar;
+class Hitch;
 
 class Model : public BodyEnvironment {
 public:
@@ -43,18 +43,14 @@ public:
     // Externally-managed subcomponents
     int addThruster(Thruster* t);
     int addSurface(Surface* surf);
-    int addRotorpart(Rotorpart* rpart);
-    int addRotorblade(Rotorblade* rblade);
-    int addRotor(Rotor* rotor);
     int addGear(Gear* gear);
     void addHook(Hook* hook);
     void addLaunchbar(Launchbar* launchbar);
     Surface* getSurface(int handle);
-    Rotorpart* getRotorpart(int handle);
-    Rotorblade* getRotorblade(int handle);
-    Rotor* getRotor(int handle);
+    Rotorgear* getRotorgear(void);
     Gear* getGear(int handle);
     Hook* getHook(void);
+    int addHitch(Hitch* hitch);
     Launchbar* getLaunchbar(void);
 
     // Semi-private methods for use by the Airplane solver.
@@ -84,7 +80,8 @@ private:
     void initRotorIteration();
     void calcGearForce(Gear* g, float* v, float* rot, float* ground);
     float gearFriction(float wgt, float v, Gear* g);
-    void localWind(float* pos, State* s, float* out, float alt);
+    void localWind(float* pos, State* s, float* out, float alt,
+        bool is_rotor = false);
 
     Integrator _integrator;
     RigidBody _body;
@@ -93,12 +90,11 @@ private:
 
     Vector _thrusters;
     Vector _surfaces;
-    Vector _rotorparts;
-    Vector _rotorblades;
-    Vector _rotors;
+    Rotorgear _rotorgear;
     Vector _gears;
     Hook* _hook;
     Launchbar* _launchbar;
+    Vector _hitches;
 
     float _groundEffectSpan;
     float _groundEffect;