looping(false)
{ }
-// Avoid synthesizing ~RefPtr in files including animation.h
Animation::~Animation()
-{ }
+{
+ for(vector<Curve *>::iterator i=curves.begin(); i!=curves.end(); ++i)
+ delete *i;
+}
void Animation::set_armature(const Armature &a)
{
while(n_control--)
knots.pop_back();
+ if(knots.size()==1)
+ {
+ knots.push_back(knots.back());
+ knots.push_back(knots.back());
+ knots.back().x += 1;
+ knots.push_back(knots.back());
+ }
+
curves.push_back(new ValueCurve<N>(target, component, knots));
}
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)
{