+KeyFrame::AnimatedUniform Animation::Iterator::get_uniform(unsigned i) const
+{
+ if(!iter->prev)
+ {
+ if(iter->uniforms.size()>i)
+ return iter->uniforms[i];
+ else
+ return KeyFrame::AnimatedUniform(animation.uniforms[i].size, 0.0f);
+ }
+
+ unsigned size = animation.uniforms[i].size;
+ float t = time_since_keyframe/iter->delta_t;
+ KeyFrame::AnimatedUniform result(size, 0.0f);
+ for(unsigned j=0; j<size; ++j)
+ result.values[j] = iter->prev->uniforms[i].values[j]*(1-t)+iter->uniforms[i].values[j]*t;
+ return result;
+}
+