]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/sky/newcloud.hxx
Merge branch 'ehofman/sound'
[simgear.git] / simgear / scene / sky / newcloud.hxx
index 3cb93dd42144c0229be2cc628ad30772a83e42e1..28f8a9c38f5d2d296e9653dd0a0ad1b9c3d3af33 100644 (file)
@@ -31,6 +31,9 @@
 
 #include "bbcache.hxx"
 
+#include <simgear/scene/material/Effect.hxx>
+#include <simgear/scene/material/EffectGeode.hxx>
+
 using std::string;
 using std::vector;
 
@@ -40,7 +43,8 @@ using std::vector;
 class SGNewCloud {
 
 public:
-        SGNewCloud(const SGPath &tex_path, 
+        SGNewCloud(string type,
+                   const SGPath &tex_path, 
                     string tex,
                     double min_w,
                     double max_w,
@@ -54,11 +58,23 @@ public:
                     int n,
                     int nt_x,
                     int nt_y);
-        
-       ~SGNewCloud();
+
+        ~SGNewCloud();
 
         // Generate a Cloud
-        osg::ref_ptr<osg::LOD> genCloud ();
+        osg::ref_ptr<simgear::EffectGeode> genCloud ();
+
+        static double getDensity(void)
+        {
+            return sprite_density;
+        }
+    
+        // Set the sprite density
+        static void setDensity(double d)
+        {
+            sprite_density = d;
+        }
+        
 
 private:
 
@@ -75,12 +91,15 @@ private:
         int num_textures_x;
         int num_textures_y;
         const string texture;
-        
-        osg::ref_ptr<osg::StateSet> stateSet;
+        const string name;
+        osg::Geometry* quad;
+        osg::ref_ptr<simgear::Effect> effect;
+        static double sprite_density;
 
-public:
+        osg::Geometry* createOrthQuad(float w, float h, int varieties_x, int varieties_y);
 
 };
 
 
+
 #endif // _NEWCLOUD_HXX