]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/sky/cloud.hxx
Frederic Bouvier:
[simgear.git] / simgear / scene / sky / cloud.hxx
index 90c33f62c58df1c6307fb74fe22b3bfb054b917a..cda7245f3a75ee45e36316f1d3a50b2061a77661 100644 (file)
 #include STL_STRING
 SG_USING_STD(string);
 
+// #include <iostream>
+// SG_USING_STD(cout);
+// SG_USING_STD(endl);
+
 
 /**
  * A class layer to model a single cloud layer
@@ -81,8 +85,9 @@ public:
      * of the cloud layer.  The elevation of the top of the layer is
      * elevation_m + thickness_m.
      * @param elevation_m the layer elevation in meters
+     * @param set_span defines whether it is allowed to adjust the span
      */
-    void setElevation_m (float elevation_m);
+    void setElevation_m (float elevation_m, bool set_span = true);
 
     /** get the layer thickness */
     float getThickness_m () const;
@@ -118,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; }
@@ -127,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; }
@@ -156,13 +167,14 @@ public:
                      double dt = 0.0 );
 
     /** draw the cloud layer */
-    void draw();
+    void draw( bool top );
 
 private:
 
     ssgRoot *layer_root;
     ssgTransform *layer_transform;
     ssgLeaf *layer[4];
+    ssgStateSelector *state_sel;
 
     ssgColourArray *cl[4]; 
     ssgVertexArray *vl[4];
@@ -183,8 +195,7 @@ private:
     // from winds, and to simulate the clouds being tied to ground
     // position, not view position
     // double xoff, yoff;
-    double last_lon, last_lat;
-
+    double last_lon, last_lat, last_course;
 };