]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/sky/newcloud.hxx
Merge branch 'next' of git.gitorious.org:fg/simgear into next
[simgear.git] / simgear / scene / sky / newcloud.hxx
index a4ff8be41bf828b02d5a1ffceacd758a3b1c7200..91db9f60b37dbaaaaa3b87018b798ae1c1e5ea27 100644 (file)
 #ifndef _NEWCLOUD_HXX
 #define _NEWCLOUD_HXX
 
-#include <plib/sg.h>
 #include <simgear/compiler.h>
 #include <string>
 #include <vector>
 #include <osg/Fog>
 
-#include "bbcache.hxx"
+#include <simgear/scene/material/Effect.hxx>
+#include <simgear/scene/material/EffectGeode.hxx>
 
 using std::string;
 using std::vector;
@@ -40,26 +40,12 @@ using std::vector;
 class SGNewCloud {
 
 public:
-        SGNewCloud(string type,
-                   const SGPath &tex_path, 
-                    string tex,
-                    double min_w,
-                    double max_w,
-                    double min_h,
-                    double max_h,
-                    double min_sprite_w,
-                    double max_sprite_w,
-                    double min_sprite_h,
-                    double max_sprite_h,
-                    double b,
-                    int n,
-                    int nt_x,
-                    int nt_y);
+        SGNewCloud(const SGPath &texture_root, const SGPropertyNode *cld_def);
 
         ~SGNewCloud();
 
         // Generate a Cloud
-        osg::ref_ptr<osg::Geode> genCloud ();
+        osg::ref_ptr<simgear::EffectGeode> genCloud ();
 
         static double getDensity(void)
         {
@@ -72,19 +58,6 @@ public:
             sprite_density = d;
         }
         
-        static int getNumFlavours(void)
-        {
-            return num_flavours;
-        }
-    
-        // Set the number of flavours of this cloud.
-        // This is the number of different instances
-        // to generate.
-        static void setNumFlavours(int d)
-        {
-            num_flavours = d;
-        }
-        
 
 private:
 
@@ -97,15 +70,15 @@ private:
         double min_sprite_height;
         double max_sprite_height;
         double bottom_shade;
+        double zscale;
+        bool height_map_texture;
         int num_sprites;
         int num_textures_x;
         int num_textures_y;
-        const string texture;
-        const string name;
+        string texture;
         osg::Geometry* quad;
-        osg::ref_ptr<osg::StateSet> stateSet;
+        osg::ref_ptr<simgear::Effect> effect;
         static double sprite_density;
-        static int num_flavours; 
 
         osg::Geometry* createOrthQuad(float w, float h, int varieties_x, int varieties_y);
 
@@ -113,5 +86,4 @@ private:
 
 
 
-
 #endif // _NEWCLOUD_HXX