瀏覽代碼

Optimizes and cleans up animation system.
Removes need to keep track of AnimationTarget's being animated by the AnimationController.
Removes pass of marking AnimationTarget's as clean from AnimationController::update().
Removes property state bits from AnimationTarget's.

Kieran Cunney 13 年之前
父節點
當前提交
1129e9e600

+ 1 - 7
gameplay/src/AnimationClip.cpp

@@ -304,7 +304,7 @@ void AnimationClip::addEndListener(AnimationClip::Listener* listener)
     _endListeners->push_back(listener);
 }
 
-bool AnimationClip::update(unsigned long elapsedTime, std::list<AnimationTarget*>* activeTargets)
+bool AnimationClip::update(unsigned long elapsedTime)
 {
     if (isClipStateBitSet(CLIP_IS_PAUSED_BIT))
     {
@@ -439,12 +439,6 @@ bool AnimationClip::update(unsigned long elapsedTime, std::list<AnimationTarget*
         target = channel->_target;
         value = _values[i];
 
-        // If the target's _animationPropertyBitFlag is clear, we can assume that this is the first
-        // animation channel to act on the target and we can add the target to the list of
-        // active targets stored by the AnimationController.
-        if (target->_animationPropertyBitFlag == 0x00)
-            activeTargets->push_front(target);
-
         // Evaluate the point on Curve
         channel->getCurve()->evaluate(percentComplete, value->_value);
         // Set the animation value on the target property.

+ 1 - 1
gameplay/src/AnimationClip.h

@@ -283,7 +283,7 @@ private:
     /**
      * Updates the animation with the elapsed time.
      */
-    bool update(unsigned long elapsedTime, std::list<AnimationTarget*>* activeTargets);
+    bool update(unsigned long elapsedTime);
 
     /**
      * Handles when the AnimationClip begins.

+ 1 - 11
gameplay/src/AnimationController.cpp

@@ -109,7 +109,7 @@ void AnimationController::update(long elapsedTime)
             _runningClips.push_back(clip);
             clipIter = _runningClips.erase(clipIter);
         }
-        else if (clip->update(elapsedTime, &_activeTargets))
+        else if (clip->update(elapsedTime))
         {
             SAFE_RELEASE(clip);
             clipIter = _runningClips.erase(clipIter);
@@ -120,16 +120,6 @@ void AnimationController::update(long elapsedTime)
         }
     }
 
-    // Loop through active AnimationTarget's and reset their _animationPropertyBitFlag for the next frame.
-    std::list<AnimationTarget*>::iterator targetItr = _activeTargets.begin();
-    while (targetItr != _activeTargets.end())
-    {
-        AnimationTarget* target = (*targetItr);
-        target->_animationPropertyBitFlag = 0x00;
-        targetItr++;
-    }
-    _activeTargets.clear();
-    
     if (_runningClips.empty())
         _state = IDLE;
 }

+ 0 - 1
gameplay/src/AnimationController.h

@@ -98,7 +98,6 @@ private:
     
     State _state;                                 // The current state of the AnimationController.
     std::list<AnimationClip*> _runningClips;      // A list of running AnimationClips.
-    std::list<AnimationTarget*> _activeTargets;   // A list of animating AnimationTargets.
 };
 
 }

+ 1 - 1
gameplay/src/AnimationTarget.cpp

@@ -8,7 +8,7 @@ namespace gameplay
 {
 
 AnimationTarget::AnimationTarget()
-    : _targetType(SCALAR), _animationPropertyBitFlag(0x00), _animationChannels(NULL)
+    : _targetType(SCALAR), _animationChannels(NULL)
 {
 }
 

+ 0 - 5
gameplay/src/AnimationTarget.h

@@ -202,11 +202,6 @@ protected:
      */
     TargetType _targetType;
 
-    /**
-     * Bit flag used to indicate which properties on the AnimationTarget are currently animating.
-     */ 
-    unsigned char _animationPropertyBitFlag;
-
 private:
 
     /**

+ 19 - 78
gameplay/src/Control.cpp

@@ -827,8 +827,8 @@ namespace gameplay
             value->setFloat(1, _bounds.y);
             break;
         case ANIMATE_SIZE:
-            value->setFloat(0, _clipBounds.width);
-            value->setFloat(1, _clipBounds.height);
+            value->setFloat(0, _bounds.width);
+            value->setFloat(1, _bounds.height);
             break;
         case ANIMATE_POSITION_X:
             value->setFloat(0, _bounds.x);
@@ -837,10 +837,10 @@ namespace gameplay
             value->setFloat(0, _bounds.y);
             break;
         case ANIMATE_SIZE_WIDTH:
-            value->setFloat(0, _clipBounds.width);
+            value->setFloat(0, _bounds.width);
             break;
         case ANIMATE_SIZE_HEIGHT:
-            value->setFloat(0, _clipBounds.height);
+            value->setFloat(0, _bounds.height);
             break;
         case ANIMATE_OPACITY:
         default:
@@ -853,96 +853,37 @@ namespace gameplay
         switch(propertyId)
         {
         case ANIMATE_POSITION:
-            applyAnimationValuePositionX(value->getFloat(0), blendWeight);
-            applyAnimationValuePositionY(value->getFloat(1), blendWeight);
+            _bounds.x = Curve::lerp(blendWeight, _bounds.x, value->getFloat(0));
+            _bounds.y = Curve::lerp(blendWeight, _bounds.y, value->getFloat(1));
+            _dirty = true;
             break;
         case ANIMATE_POSITION_X:
-            applyAnimationValuePositionX(value->getFloat(0), blendWeight);
+            _bounds.x = Curve::lerp(blendWeight, _bounds.x, value->getFloat(0));
+            _dirty = true;
             break;
         case ANIMATE_POSITION_Y:
-            applyAnimationValuePositionY(value->getFloat(0), blendWeight);
+            _bounds.y = Curve::lerp(blendWeight, _bounds.y, value->getFloat(0));
+            _dirty = true;
             break;
         case ANIMATE_SIZE:
-            applyAnimationValueSizeWidth(value->getFloat(0), blendWeight);
-            applyAnimationValueSizeHeight(value->getFloat(1), blendWeight);
+            _bounds.width = Curve::lerp(blendWeight, _bounds.width, value->getFloat(0));
+            _bounds.height = Curve::lerp(blendWeight, _bounds.height, value->getFloat(1));
+            _dirty = true;
             break;
         case ANIMATE_SIZE_WIDTH:
-            applyAnimationValueSizeWidth(value->getFloat(0), blendWeight);
+            _bounds.width = Curve::lerp(blendWeight, _bounds.width, value->getFloat(0));
+            _dirty = true;
             break;
         case ANIMATE_SIZE_HEIGHT:
-            applyAnimationValueSizeHeight(value->getFloat(0), blendWeight);
+            _bounds.height = Curve::lerp(blendWeight, _bounds.height, value->getFloat(0));
+            _dirty = true;
             break;
         case ANIMATE_OPACITY:
-            applyAnimationValueOpacity();
+            _dirty = true;
         default:
             break;
         }
     }
-
-    void Control::applyAnimationValuePositionX(float x, float blendWeight)
-    {
-        if ((_animationPropertyBitFlag & ANIMATION_POSITION_X_BIT) != ANIMATION_POSITION_X_BIT)
-        {
-            _animationPropertyBitFlag |= ANIMATION_POSITION_X_BIT;
-        }
-        else
-        {
-            x = Curve::lerp(blendWeight, _bounds.x, x);
-        }
-        _bounds.x = x;
-        _dirty = true;
-    }
-    
-    void Control::applyAnimationValuePositionY(float y, float blendWeight)
-    {
-        if ((_animationPropertyBitFlag & ANIMATION_POSITION_Y_BIT) != ANIMATION_POSITION_Y_BIT)
-        {
-            _animationPropertyBitFlag |= ANIMATION_POSITION_Y_BIT;
-        }
-        else
-        {
-            y = Curve::lerp(blendWeight, _bounds.y, y);
-        }
-        _bounds.y = y;
-        _dirty = true;
-    }
-    
-    void Control::applyAnimationValueSizeWidth(float width, float blendWeight)
-    {
-        if ((_animationPropertyBitFlag & ANIMATION_SIZE_WIDTH_BIT) != ANIMATION_SIZE_WIDTH_BIT)
-        {
-            _animationPropertyBitFlag |= ANIMATION_SIZE_WIDTH_BIT;
-        }
-        else
-        {
-            width = Curve::lerp(blendWeight, _clipBounds.width, width);
-        }
-        _clipBounds.width = width;
-        _dirty = true;
-    }
-
-    void Control::applyAnimationValueSizeHeight(float height, float blendWeight)
-    {
-        if ((_animationPropertyBitFlag & ANIMATION_SIZE_HEIGHT_BIT) != ANIMATION_SIZE_HEIGHT_BIT)
-        {
-            _animationPropertyBitFlag |= ANIMATION_SIZE_HEIGHT_BIT;
-        }
-        else
-        {
-            height = Curve::lerp(blendWeight, _clipBounds.height, height);
-        }
-        _clipBounds.height = height;
-        _dirty = true;
-    }
-
-    void Control::applyAnimationValueOpacity()
-    {
-        if ((_animationPropertyBitFlag & ANIMATION_OPACITY_BIT) != ANIMATION_OPACITY_BIT)
-        {
-            _animationPropertyBitFlag |= ANIMATION_OPACITY_BIT;
-        }
-        _dirty = true;
-    }
     
     Theme::Style::Overlay** Control::getOverlays(unsigned char overlayTypes, Theme::Style::Overlay** overlays)
     {

+ 0 - 16
gameplay/src/Control.h

@@ -877,26 +877,10 @@ protected:
 
 private:
 
-    static const char ANIMATION_POSITION_X_BIT = 0x01;
-    static const char ANIMATION_POSITION_Y_BIT = 0x02;
-    static const char ANIMATION_SIZE_WIDTH_BIT = 0x04;
-    static const char ANIMATION_SIZE_HEIGHT_BIT = 0x08;
-    static const char ANIMATION_OPACITY_BIT = 0x10;
-
     /*
      * Constructor.
      */    
     Control(const Control& copy);
-    
-    void applyAnimationValuePositionX(float x, float blendWeight);
-    
-    void applyAnimationValuePositionY(float y, float blendWeight);
-    
-    void applyAnimationValueSizeWidth(float width, float blendWeight);
-    
-    void applyAnimationValueSizeHeight(float height, float blendWeight);
-    
-    void applyAnimationValueOpacity();
 
     Theme::Style::Overlay** getOverlays(unsigned char overlayTypes, Theme::Style::Overlay** overlays);
 

+ 6 - 45
gameplay/src/MaterialParameter.cpp

@@ -394,50 +394,21 @@ void MaterialParameter::setAnimationPropertyValue(int propertyId, AnimationValue
                 case FLOAT:
                 {
                     if (_count == 1)
-                    {
-                        if ((_animationPropertyBitFlag & ANIMATION_UNIFORM_BIT) != ANIMATION_UNIFORM_BIT)
-                        {
-                            _animationPropertyBitFlag |= ANIMATION_UNIFORM_BIT;
-                            _value.floatValue = value->getFloat(0);
-                        }
-                        else
-                        {
-                            _value.floatValue = Curve::lerp(blendWeight, _value.floatValue, value->getFloat(0));
-                        }
-                    }
+                        _value.floatValue = Curve::lerp(blendWeight, _value.floatValue, value->getFloat(0));
                     else
-                    {
                         applyAnimationValue(value, blendWeight, 1);
-                    }                    
                     break;
                 }
                 case INT:
                 {
                     if (_count == 1)
                     {
-                        if ((_animationPropertyBitFlag & ANIMATION_UNIFORM_BIT) != ANIMATION_UNIFORM_BIT)
-                        {
-                            _animationPropertyBitFlag |= ANIMATION_UNIFORM_BIT;
-                            _value.intValue = value->getFloat(0);
-                        }
-                        else
-                        {
-                            _value.intValue = Curve::lerp(blendWeight, _value.intValue, value->getFloat(0));
-                        }
+                        _value.intValue = Curve::lerp(blendWeight, _value.intValue, value->getFloat(0));
                     }
                     else
                     {
-                        if ((_animationPropertyBitFlag & ANIMATION_UNIFORM_BIT) != ANIMATION_UNIFORM_BIT)
-                        {
-                            _animationPropertyBitFlag |= ANIMATION_UNIFORM_BIT;
-                            for (unsigned int i = 0; i < _count; i++)
-                                _value.intPtrValue[i] = value->getFloat(i);
-                        }
-                        else
-                        {
-                            for (unsigned int i = 0; i < _count; i++)
-                                _value.intPtrValue[i] = Curve::lerp(blendWeight, _value.intPtrValue[i], value->getFloat(i));
-                        }
+                        for (unsigned int i = 0; i < _count; i++)
+                            _value.intPtrValue[i] = Curve::lerp(blendWeight, _value.intPtrValue[i], value->getFloat(i));
                     }
                     break;
                 }
@@ -466,18 +437,8 @@ void MaterialParameter::setAnimationPropertyValue(int propertyId, AnimationValue
 void MaterialParameter::applyAnimationValue(AnimationValue* value, float blendWeight, int components)
 {
     unsigned int count = _count * components;
-    if ((_animationPropertyBitFlag & ANIMATION_UNIFORM_BIT) != ANIMATION_UNIFORM_BIT)
-    {
-        _animationPropertyBitFlag |= ANIMATION_UNIFORM_BIT;
-
-        for (unsigned int i = 0; i < count; i++)
-            _value.floatPtrValue[i] = value->getFloat(i);
-    }
-    else
-    {
-        for (unsigned int i = 0; i < count; i++)
-            _value.floatPtrValue[i] = Curve::lerp(blendWeight, _value.floatPtrValue[i], value->getFloat(i));
-    }
+    for (unsigned int i = 0; i < count; i++)
+        _value.floatPtrValue[i] = Curve::lerp(blendWeight, _value.floatPtrValue[i], value->getFloat(i));
 }
 
 void MaterialParameter::cloneInto(MaterialParameter* materialParameter) const

+ 1 - 3
gameplay/src/MaterialParameter.h

@@ -167,9 +167,7 @@ public:
     void setAnimationPropertyValue(int propertyId, AnimationValue* value, float blendWeight = 1.0f);
 
 private:
-
-    static const char ANIMATION_UNIFORM_BIT = 0x01;
-    
+   
     /**
      * Constructor.
      */

+ 1 - 10
gameplay/src/ThemeStyle.cpp

@@ -451,16 +451,7 @@ void Theme::Style::Overlay::setAnimationPropertyValue(int propertyId, AnimationV
     {
         case ANIMATE_OPACITY:
         {
-            float opacity = value->getFloat(0);
-            if ((_animationPropertyBitFlag & ANIMATION_OPACITY_BIT) != ANIMATION_OPACITY_BIT)
-            {
-                _animationPropertyBitFlag |= ANIMATION_OPACITY_BIT;
-            }
-            else
-            {
-                opacity = Curve::lerp(blendWeight, _opacity, opacity);
-            }
-            _opacity = opacity;
+            _opacity = Curve::lerp(blendWeight, _opacity, value->getFloat(0));
             break;
         }
         default:

+ 1 - 4
gameplay/src/ThemeStyle.h

@@ -49,7 +49,6 @@ private:
     private:
 
         static const int ANIMATE_OPACITY = 1;
-        static const char ANIMATION_OPACITY_BIT = 0x01;
 
         Overlay();
             
@@ -145,9 +144,7 @@ private:
         void setImageList(Theme::ImageList* imageList);
             
         Theme::ImageList* getImageList() const;
-
-        void applyAnimationValueOpacity(float opacity, float blendWeight);
-
+        
         Skin* _skin;
         Theme::ThemeImage* _cursor;
         Theme::ImageList* _imageList;

+ 20 - 97
gameplay/src/Transform.cpp

@@ -665,80 +665,66 @@ void Transform::setAnimationPropertyValue(int propertyId, AnimationValue* value,
     {
         case ANIMATE_SCALE_UNIT:
         {
-            applyAnimationValueScaleX(value->getFloat(0), blendWeight);
-            applyAnimationValueScaleY(value->getFloat(0), blendWeight);
-            applyAnimationValueScaleZ(value->getFloat(0), blendWeight);
+            float scale = Curve::lerp(blendWeight, _scale.x, value->getFloat(0));
+            setScale(scale);
             break;
         }   
         case ANIMATE_SCALE:
         {
-            applyAnimationValueScaleX(value->getFloat(0), blendWeight);
-            applyAnimationValueScaleY(value->getFloat(1), blendWeight);
-            applyAnimationValueScaleZ(value->getFloat(2), blendWeight);
+            setScale(Curve::lerp(blendWeight, _scale.x, value->getFloat(0)), Curve::lerp(blendWeight, _scale.y, value->getFloat(1)), Curve::lerp(blendWeight, _scale.z, value->getFloat(2)));
             break;
         }
         case ANIMATE_SCALE_X:
         {
-            applyAnimationValueScaleX(value->getFloat(0), blendWeight);
+            setScaleX(Curve::lerp(blendWeight, _scale.x, value->getFloat(0)));
             break;
         }
         case ANIMATE_SCALE_Y:
         {
-            applyAnimationValueScaleY(value->getFloat(0), blendWeight);
+            setScaleY(Curve::lerp(blendWeight, _scale.y, value->getFloat(0)));
             break;
         }
         case ANIMATE_SCALE_Z:
         {
-            applyAnimationValueScaleZ(value->getFloat(0), blendWeight);
+            setScaleZ(Curve::lerp(blendWeight, _scale.z, value->getFloat(0)));
             break;
         }
         case ANIMATE_ROTATE:
         {
-            Quaternion q(value->getFloat(0), value->getFloat(1), value->getFloat(2), value->getFloat(3));
-            applyAnimationValueRotation(&q, blendWeight);
+            applyAnimationValueRotation(value, 0, blendWeight);
             break;
         }
         case ANIMATE_TRANSLATE:
         {
-            applyAnimationValueTranslationX(value->getFloat(0), blendWeight);
-            applyAnimationValueTranslationY(value->getFloat(1), blendWeight);
-            applyAnimationValueTranslationZ(value->getFloat(2), blendWeight);
+            setTranslation(Curve::lerp(blendWeight, _translation.x, value->getFloat(0)), Curve::lerp(blendWeight, _translation.y, value->getFloat(1)), Curve::lerp(blendWeight, _translation.z, value->getFloat(2)));
             break;
         }
         case ANIMATE_TRANSLATE_X:
         {
-            applyAnimationValueTranslationX(value->getFloat(0), blendWeight);
+            setTranslationX(Curve::lerp(blendWeight, _translation.x, value->getFloat(0)));
             break;
         }
         case ANIMATE_TRANSLATE_Y:
         {
-            applyAnimationValueTranslationY(value->getFloat(0), blendWeight);
+            setTranslationY(Curve::lerp(blendWeight, _translation.y, value->getFloat(0)));
             break;
         }
         case ANIMATE_TRANSLATE_Z:
         {
-            applyAnimationValueTranslationZ(value->getFloat(0), blendWeight);
+            setTranslationZ(Curve::lerp(blendWeight, _translation.z, value->getFloat(0)));
             break;
         }
         case ANIMATE_ROTATE_TRANSLATE:
         {
-            Quaternion q(value->getFloat(0), value->getFloat(1), value->getFloat(2), value->getFloat(3));
-            applyAnimationValueRotation(&q, blendWeight);
-            applyAnimationValueTranslationX(value->getFloat(4), blendWeight);
-            applyAnimationValueTranslationY(value->getFloat(5), blendWeight);
-            applyAnimationValueTranslationZ(value->getFloat(6), blendWeight);
+            applyAnimationValueRotation(value, 0, blendWeight);
+            setTranslation(Curve::lerp(blendWeight, _translation.x, value->getFloat(4)), Curve::lerp(blendWeight, _translation.y, value->getFloat(5)), Curve::lerp(blendWeight, _translation.z, value->getFloat(6)));
             break;
         }
         case ANIMATE_SCALE_ROTATE_TRANSLATE:
         {
-            applyAnimationValueScaleX(value->getFloat(0), blendWeight);
-            applyAnimationValueScaleY(value->getFloat(1), blendWeight);
-            applyAnimationValueScaleZ(value->getFloat(2), blendWeight);
-            Quaternion q(value->getFloat(3), value->getFloat(4), value->getFloat(5), value->getFloat(6));
-            applyAnimationValueRotation(&q, blendWeight);
-            applyAnimationValueTranslationX(value->getFloat(7), blendWeight);
-            applyAnimationValueTranslationY(value->getFloat(8), blendWeight);
-            applyAnimationValueTranslationZ(value->getFloat(9), blendWeight);
+            setScale(Curve::lerp(blendWeight, _scale.x, value->getFloat(0)), Curve::lerp(blendWeight, _scale.y, value->getFloat(1)), Curve::lerp(blendWeight, _scale.z, value->getFloat(2)));
+            applyAnimationValueRotation(value, 3, blendWeight);
+            setTranslation(Curve::lerp(blendWeight, _translation.x, value->getFloat(7)), Curve::lerp(blendWeight, _translation.y, value->getFloat(8)), Curve::lerp(blendWeight, _translation.z, value->getFloat(9)));
             break;
         }
         default:
@@ -798,74 +784,11 @@ void Transform::cloneInto(Transform* transform, NodeCloneContext &context) const
     transform->_translation.set(_translation);
 }
 
-void Transform::applyAnimationValueScaleX(float sx, float blendWeight)
+void Transform::applyAnimationValueRotation(AnimationValue* value, unsigned int index, float blendWeight)
 {
-    if ((_animationPropertyBitFlag & ANIMATION_SCALE_X_BIT) != ANIMATION_SCALE_X_BIT)
-        _animationPropertyBitFlag |= ANIMATION_SCALE_X_BIT;
-    else
-        sx = Curve::lerp(blendWeight, _scale.x, sx);
-
-    setScaleX(sx);
-}
-
-void Transform::applyAnimationValueScaleY(float sy, float blendWeight)
-{
-    if ((_animationPropertyBitFlag & ANIMATION_SCALE_Y_BIT) != ANIMATION_SCALE_Y_BIT)
-        _animationPropertyBitFlag |= ANIMATION_SCALE_Y_BIT;
-    else
-        sy = Curve::lerp(blendWeight, _scale.y, sy);
-
-    setScaleY(sy);
-}
-
-void Transform::applyAnimationValueScaleZ(float sz, float blendWeight)
-{
-    if ((_animationPropertyBitFlag & ANIMATION_SCALE_Z_BIT) != ANIMATION_SCALE_Z_BIT)
-        _animationPropertyBitFlag |= ANIMATION_SCALE_Z_BIT;
-    else
-        sz = Curve::lerp(blendWeight, _scale.z, sz);
-
-    setScaleZ(sz);
-}
-
-void Transform::applyAnimationValueRotation(Quaternion* q, float blendWeight)
-{
-    if ((_animationPropertyBitFlag & ANIMATION_ROTATION_BIT) != ANIMATION_ROTATION_BIT)
-        _animationPropertyBitFlag |= ANIMATION_ROTATION_BIT;
-    else
-        Quaternion::slerp(_rotation, *q, blendWeight, q);
-     
-    setRotation(*q);
-}
-
-void Transform::applyAnimationValueTranslationX(float tx, float blendWeight)
-{
-    if ((_animationPropertyBitFlag & ANIMATION_TRANSLATION_X_BIT) != ANIMATION_TRANSLATION_X_BIT)
-        _animationPropertyBitFlag |= ANIMATION_TRANSLATION_X_BIT;
-    else
-        tx = Curve::lerp(blendWeight, _translation.x, tx);
-
-    setTranslationX(tx);
-}
-
-void Transform::applyAnimationValueTranslationY(float ty, float blendWeight)
-{
-    if ((_animationPropertyBitFlag & ANIMATION_TRANSLATION_Y_BIT) != ANIMATION_TRANSLATION_Y_BIT)
-        _animationPropertyBitFlag |= ANIMATION_TRANSLATION_Y_BIT;
-    else
-        ty = Curve::lerp(blendWeight, _translation.y, ty);
-
-    setTranslationY(ty);
-}
-
-void Transform::applyAnimationValueTranslationZ(float tz, float blendWeight)
-{
-    if ((_animationPropertyBitFlag & ANIMATION_TRANSLATION_Z_BIT) != ANIMATION_TRANSLATION_Z_BIT)
-        _animationPropertyBitFlag |= ANIMATION_TRANSLATION_Z_BIT;
-    else
-        tz = Curve::lerp(blendWeight, _translation.z, tz);
-
-    setTranslationZ(tz);
+    Quaternion q(value->getFloat(index), value->getFloat(index + 1), value->getFloat(index + 2), value->getFloat(index + 3));
+    Quaternion::slerp(_rotation, q, blendWeight, &q);
+    setRotation(q);
 }
 
 }

+ 1 - 15
gameplay/src/Transform.h

@@ -811,21 +811,7 @@ protected:
     std::list<TransformListener>* _listeners;
 
 private:
-    static const char ANIMATION_SCALE_X_BIT = 0x01; 
-    static const char ANIMATION_SCALE_Y_BIT = 0x02; 
-    static const char ANIMATION_SCALE_Z_BIT = 0x04; 
-    static const char ANIMATION_ROTATION_BIT = 0x08;  
-    static const char ANIMATION_TRANSLATION_X_BIT = 0x10; 
-    static const char ANIMATION_TRANSLATION_Y_BIT = 0x20; 
-    static const char ANIMATION_TRANSLATION_Z_BIT = 0x40; 
-
-    void applyAnimationValueScaleX(float sx, float blendWeight);
-    void applyAnimationValueScaleY(float sy, float blendWeight);
-    void applyAnimationValueScaleZ(float sz, float blendWeight);
-    void applyAnimationValueRotation(Quaternion* q, float blendWeight);
-    void applyAnimationValueTranslationX(float tx, float blendWeight);
-    void applyAnimationValueTranslationY(float ty, float blendWeight);
-    void applyAnimationValueTranslationZ(float tz, float blendWeight);
+    void applyAnimationValueRotation(AnimationValue* value, unsigned int index, float blendWeight);
 };
 
 }