]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/model/particles.hxx
Add bool and int uniform types for shaders, and vertex-program-two-sided
[simgear.git] / simgear / scene / model / particles.hxx
index 4c9d5053f63bd55038ad14f57ffe0056612aea47..6dda343db2628b77b7ed2c6c114e41ab598475b8 100644 (file)
@@ -75,7 +75,7 @@ public:
     }
 
     virtual void operator()(osg::Node* node, osg::NodeVisitor* nv);
-    
+
     static const osg::Vec3 &getGravityVector()
     {
         return gravity;
@@ -86,10 +86,22 @@ public:
         return wind;
     }
 
+    static void setSwitch(const SGPropertyNode* n)
+    {
+        enabledNode = n;
+    }
+
+    static bool getEnabled()
+    {
+        return enabled;
+    }
+
 private:
     static osg::Vec3 gravity;
     static osg::Vec3 wind;
     const SGPropertyNode* modelRoot;
+    static SGConstPropertyNode_ptr enabledNode;
+    static bool enabled;
 };
 
 
@@ -237,6 +249,8 @@ public:
         return psu.get();
     }
 
+    static void setFrozen(bool e) { _frozen = e; }
+
     /**
      *  Set and get the wind vector for particles in the
      * atmosphere. This vector is in the Z-up Y-north frame, and the
@@ -267,6 +281,7 @@ protected:
     
     bool useGravity;
     bool useWind;
+    static bool _frozen;
     static osg::ref_ptr<osgParticle::ParticleSystemUpdater> psu;
     static osg::ref_ptr<osg::Group> commonRoot;
     static osg::ref_ptr<osg::Geode> commonGeode;