]> git.mxchange.org Git - simgear.git/blobdiff - simgear/sky/cloud.hxx
Updating cloud code.
[simgear.git] / simgear / sky / cloud.hxx
index 1faabb3f5605cbf82932201058049c1007749226..1da11bb5a2246da38054490e7a6c9aa3f2e1b417 100644 (file)
@@ -32,6 +32,7 @@
 
 class SGCloudLayer {
 
+    ssgRoot *layer_root;
     ssgTransform *layer_transform;
     ssgSimpleState *layer_state;
 
@@ -39,7 +40,18 @@ class SGCloudLayer {
     ssgVertexArray *vl;
     ssgTexCoordArray *tl;
 
-    float layer_asl;           // height above sea level (meters)
+    // height above sea level (meters)
+    float layer_asl;
+    float layer_thickness;
+    float layer_transition;
+    float size;
+    float scale;
+
+    // for handling texture coordinates to simulate cloud movement
+    // from winds, and to simulate the clouds being tied to ground
+    // position, not view position
+    // double xoff, yoff;
+    double last_lon, last_lat;
 
 public:
 
@@ -50,7 +62,8 @@ public:
     ~SGCloudLayer( void );
 
     // build the cloud object
-    ssgBranch *build( FGPath path, double size, double asl );
+    void build( FGPath path, double size, double asl, double thickness,
+               double transition );
 
     // repaint the cloud colors based on current value of sun_angle,
     // sky, and fog colors.  This updates the color arrays for
@@ -67,7 +80,14 @@ public:
     // lat specifies a rotation about the new Y axis
     // spin specifies a rotation about the new Z axis (and orients the
     // sunrise/set effects
-    bool reposition( sgVec3 p, sgVec3 up, double lon, double lat );
+    bool reposition( sgVec3 p, sgVec3 up, double lon, double lat, double alt );
+
+    // draw the cloud layer
+    void draw();
+
+    inline float get_asl() const { return layer_asl; }
+    inline float get_thickness() const { return layer_thickness; }
+    inline float get_transition() const { return layer_transition; }
 };