X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FFDM%2FYASim%2FGear.hpp;h=62da887b82ef63644e9e0751e88490570fe9dca8;hb=d66903e9ad63b91182ccc25d9bb82f18f8dd98b6;hp=6b0301fe1767bd94f5d261ae53d51257156afb34;hpb=7eb194b3f8bf4280c994fcea0edf177f6a92cff4;p=flightgear.git diff --git a/src/FDM/YASim/Gear.hpp b/src/FDM/YASim/Gear.hpp index 6b0301fe1..62da887b8 100644 --- a/src/FDM/YASim/Gear.hpp +++ b/src/FDM/YASim/Gear.hpp @@ -1,6 +1,8 @@ #ifndef _GEAR_HPP #define _GEAR_HPP +class SGMaterial; + namespace yasim { class RigidBody; @@ -39,8 +41,16 @@ public: void setRotation(float rotation); void setExtension(float extension); void setCastering(bool castering); - void setGlobalGround(double* global_ground, float* global_vel); - + void setOnWater(bool c); + void setOnSolid(bool c); + void setSpringFactorNotPlaning(float f); + void setSpeedPlaning(float s); + void setReduceFrictionByExtension(float s); + void setInitialLoad(float l); + void setIgnoreWhileSolving(bool c); + void setGlobalGround(double* global_ground, float* global_vel, + double globalX, double globalY, + const SGMaterial *material); void getPosition(float* out); void getCompression(float* out); void getGlobalGround(double* global_ground); @@ -51,9 +61,13 @@ public: float getBrake(); float getRotation(); float getExtension(); + float getInitialLoad() {return _initialLoad; } bool getCastering(); float getCasterAngle() { return _casterAngle; } float getRollSpeed() { return _rollSpeed; } + float getBumpAltitude(); + bool getGroundIsSolid(); + float getGroundFrictionFactor() { return (float)_ground_frictionFactor; } // Takes a velocity of the aircraft relative to ground, a rotation // vector, and a ground plane (all specified in local coordinates) @@ -66,9 +80,14 @@ public: void getForce(float* force, float* contact); float getWoW(); float getCompressFraction(); + float getCompressDist() { return _compressDist; } + bool getSubmergable() {return (!_ground_isSolid)&&(!_isContactPoint); } + bool getIgnoreWhileSolving() {return _ignoreWhileSolving; } + void setContactPoint(bool c); private: float calcFriction(float wgt, float v); + float calcFrictionFluid(float wgt, float v); bool _castering; float _pos[3]; @@ -84,10 +103,28 @@ private: float _contact[3]; float _wow; float _frac; + float _initialLoad; + float _compressDist; double _global_ground[4]; float _global_vel[3]; float _casterAngle; float _rollSpeed; + bool _isContactPoint; + bool _onWater; + bool _onSolid; + float _spring_factor_not_planing; + float _speed_planing; + float _reduceFrictionByExtension; + bool _ignoreWhileSolving; + + double _ground_frictionFactor; + double _ground_rollingFriction; + double _ground_loadCapacity; + double _ground_loadResistance; + double _ground_bumpiness; + bool _ground_isSolid; + double _global_x; + double _global_y; }; }; // namespace yasim