]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/YASim/Turbulence.hpp
FGPUIDialog: fix reading from already free'd memory.
[flightgear.git] / src / FDM / YASim / Turbulence.hpp
index a615d028fb61ed34b1bcdc09b53601eef62a2373..a500245ebbdb026614c4a5ad398cce1c8150993b 100644 (file)
@@ -5,8 +5,9 @@ public:
     Turbulence(int gens, int seed);
     ~Turbulence();
     void update(double dt, double rate);
-    void setMagnitude(double mag) { _mag = mag; }
-    void getTurbulence(double* loc, float* turbOut);
+    void setMagnitude(double mag);
+    void getTurbulence(double* loc, float alt, float* up, float* turbOut);
+    void offset(float* dist);
 
 private:
     unsigned int hashrand(unsigned int i);
@@ -21,7 +22,8 @@ private:
     int _sz;
     int _seed;
 
-    double _currTime;
+    double _off[3];
+    double _timeOff;
     double _mag;
     float _x0, _x1, _y0, _y1, _z0, _z1;
     unsigned char* _data;