From: ehofman Date: Wed, 3 Mar 2004 20:05:18 +0000 (+0000) Subject: Put Curt's cloud movement fix back in X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a266790a2510e0681cec15f47d8a944b5278a67a;p=simgear.git Put Curt's cloud movement fix back in --- diff --git a/simgear/scene/sky/cloud.cxx b/simgear/scene/sky/cloud.cxx index 94daa633..5461bfd4 100644 --- a/simgear/scene/sky/cloud.cxx +++ b/simgear/scene/sky/cloud.cxx @@ -360,12 +360,9 @@ bool SGCloudLayer::reposition( sgVec3 p, sgVec3 up, double lon, double lat, Point3D dest( lon, lat, 0.0 ); double course = 0.0, dist = 0.0; - if (dest != start) { - calc_gc_course_dist( dest, start, &course, &dist ); - } + calc_gc_course_dist( dest, start, &course, &dist ); // cout << "course = " << course << ", dist = " << dist << endl; - // calculate cloud movement due to external forces double ax = 0.0, ay = 0.0, bx = 0.0, by = 0.0; @@ -417,7 +414,7 @@ bool SGCloudLayer::reposition( sgVec3 p, sgVec3 up, double lon, double lat, "Error: base = " << base[0] << "," << base[1]); } - // cout << "base = " << base[0] << "," << base[1] << endl; + // cout << "base = " << base[0] << "," << base[1] << endl; for (int i = 0; i < 4; i++) { diff --git a/simgear/scene/sky/cloud.hxx b/simgear/scene/sky/cloud.hxx index 3da2b683..4fa8c795 100644 --- a/simgear/scene/sky/cloud.hxx +++ b/simgear/scene/sky/cloud.hxx @@ -35,6 +35,10 @@ #include STL_STRING SG_USING_STD(string); +// #include +// SG_USING_STD(cout); +// SG_USING_STD(endl); + /** * A class layer to model a single cloud layer @@ -119,7 +123,10 @@ public: * set the cloud movement direction * @param dir the cloud movement direction */ - inline void setDirection(float dir) { direction = dir; } + inline void setDirection(float dir) { + // cout << "cloud dir = " << dir << endl; + direction = dir; + } /** get the cloud movement direction */ inline float getDirection() { return direction; } @@ -128,7 +135,10 @@ public: * set the cloud movement speed * @param sp the cloud movement speed */ - inline void setSpeed(float sp) { speed = sp; } + inline void setSpeed(float sp) { + // cout << "cloud speed = " << sp << endl; + speed = sp; + } /** get the cloud movement speed */ inline float getSpeed() { return speed; }