]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/model/animation.hxx
- better error message when submodel loading failed
[simgear.git] / simgear / scene / model / animation.hxx
index fd7ec8c55c232dce9153b724a2363a559bf63139..0ab2bb211ac3fd9a447e531dd2fbb90bbf8e90b1 100644 (file)
@@ -92,12 +92,15 @@ public:
    */
   static SGPersonalityBranch *current_object;
 
+  int get_animation_type(void) { return animation_type; }
+
 protected:
 
   static double sim_time_sec;
 
   ssgBranch * _branch;
 
+  int animation_type;
 };
 
 
@@ -493,7 +496,7 @@ private:
         float factor;
         float offset;
         float min;
-       float max;
+        float max;
         SGPropertyNode_ptr value_prop;
         SGPropertyNode_ptr factor_prop;
         SGPropertyNode_ptr offset_prop;
@@ -504,6 +507,7 @@ private:
         }
     };
     SGCondition *_condition;
+    bool _last_condition;
     SGPropertyNode *_prop_root;
     string _prop_base;
     SGPath _texture_base;
@@ -513,6 +517,7 @@ private:
     ssgSimpleState* _cloned_material;
     unsigned _read;
     unsigned _update;
+    unsigned _static_update;
     bool _global;
     ColorSpec _diff;
     ColorSpec _amb;
@@ -580,5 +585,51 @@ private:
   SGInterpTable * _table;
 };
 
+/**
+ * An animation to tell wich objects don't cast shadows.
+ */
+class SGShadowAnimation : public SGAnimation
+{
+public:
+  SGShadowAnimation ( SGPropertyNode *prop_root,
+                   SGPropertyNode_ptr props );
+  virtual ~SGShadowAnimation ();
+  virtual int update();
+  bool get_condition_value(void);
+private:
+  SGCondition * _condition;
+  bool _condition_value;
+};
+
+/**
++ * An "animation" that replace fixed opengl pipeline by shaders
++ */
+class SGShaderAnimation : public SGAnimation
+{
+public:
+  SGShaderAnimation ( SGPropertyNode *prop_root,
+                   SGPropertyNode_ptr props );
+  virtual ~SGShaderAnimation ();
+  virtual void init();
+  virtual int update();
+  bool get_condition_value(void);
+private:
+  SGCondition * _condition;
+  bool _condition_value;
+  int _shader_type;
+  float _param_1;
+  sgVec4 _param_color;
+public:
+  bool _depth_test;
+  float _factor;
+  SGPropertyNode_ptr _factor_prop;
+  float _speed;
+  SGPropertyNode_ptr _speed_prop;
+  ssgTexture *_effectTexture;
+  unsigned char *_textureData;
+  GLint _texWidth, _texHeight;
+  sgVec4 _envColor;
+};
+
 
 #endif // _SG_ANIMATION_HXX