X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fscene%2Fmodel%2Fanimation.hxx;h=d5063feb221e30803ef6f9929e301c478ac6b1eb;hb=3d43bc04801e9c3b54d298a031467971cd0d3366;hp=0e61500c57bcc45915b4ede54e33d09abb7dc7a8;hpb=6dc243e1afc738e947a1f1539fa7d50ad8ffba3d;p=simgear.git diff --git a/simgear/scene/model/animation.hxx b/simgear/scene/model/animation.hxx index 0e61500c..d5063feb 100644 --- a/simgear/scene/model/animation.hxx +++ b/simgear/scene/model/animation.hxx @@ -99,8 +99,17 @@ public: class SGRangeAnimation : public SGAnimation { public: - SGRangeAnimation (SGPropertyNode_ptr props); + SGRangeAnimation (SGPropertyNode *prop_root, + SGPropertyNode_ptr props); virtual ~SGRangeAnimation (); + virtual void update(); +private: + SGPropertyNode_ptr _min_prop; + SGPropertyNode_ptr _max_prop; + float _min; + float _max; + float _min_factor; + float _max_factor; }; @@ -221,6 +230,28 @@ private: sgVec3 _axis; }; +/** + * Animation to blend an object. + */ +class SGBlendAnimation : public SGAnimation +{ +public: + SGBlendAnimation( SGPropertyNode *prop_root, + SGPropertyNode_ptr props ); + virtual ~SGBlendAnimation (); + virtual void update(); +private: + SGPropertyNode_ptr _prop; + SGInterpTable * _table; + double _prev_value; + double _offset; + double _factor; + bool _has_min; + double _min; + bool _has_max; + double _max; +}; + /** * Animation to scale an object. */ @@ -350,4 +381,21 @@ private: }; +/** + * An animation to enable the alpha test + */ +class SGAlphaTestAnimation : public SGAnimation +{ +public: + SGAlphaTestAnimation (SGPropertyNode *prop_root, + SGPropertyNode_ptr props); + virtual ~SGAlphaTestAnimation (); + virtual void update(); +private: + void setAlphaClampToBranch(ssgBranch *b, float clamp); + bool _done; + float _alpha_clamp; +}; + + #endif // _SG_ANIMATION_HXX