X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fanimation.cpp;h=a8d9e9698625b027997586745cd71b9c73c1d305;hp=94c96809214215aa890797a24a9c774ff0401f74;hb=bec07999d95b76f4b47cffcc564d0cd0afc0435e;hpb=a3c795f7b07afa3e8838ad143f8df7a8d10f1ad4 diff --git a/source/animation.cpp b/source/animation.cpp index 94c96809..a8d9e969 100644 --- a/source/animation.cpp +++ b/source/animation.cpp @@ -344,12 +344,18 @@ void Animation::ValueCurve<1>::apply(float x, Matrix &matrix) const float value = spline(x); if(target==POSITION || target==SCALE) { - Vector3 vec; - vec[component] = value; if(target==POSITION) + { + Vector3 vec; + vec[component] = value; matrix.translate(vec); + } else + { + Vector3 vec(1.0f, 1.0f, 1.0f); + vec[component] = value; matrix.scale(vec); + } } else if(target==EULER) { @@ -385,7 +391,7 @@ void Animation::ValueCurve::apply(float x, KeyFrame::AnimatedUniform &uni) co uni.size = N; typename Interpolate::Spline::Value value = spline(x); for(unsigned i=0; i::get(value, i); + uni.values[i] = Interpolate::SplineValue::get(value, i); }