- const float *m1_col = matrix1->data()+i*4;
- const float *m2_col = matrix2->data()+i*4;
- float *out_col = matrix+i*4;
-
- if(i<3)
- {
- /* Linear interpolation will produce vectors that fall on the line
- between the two endpoints, and has a higher angular velocity near the
- middle. We compensate for the velocity by interpolating the angle
- around the halfway point and computing its tangent. This is
- approximated by a third degree polynomial, scaled so that the result
- will be in the range [-1, 1]. */
- float w = (axes[i].slope+(1-axes[i].slope)*u*u)*u*0.5f+0.5f;
-
- /* The interpolated vectors will also be shorter than unit length. At
- the halfway point the length will be equal to the cosine of half the
- angle, which was computed earlier. Use a second degree polynomial to
- approximate. */
- float n = (axes[i].scale+(1-axes[i].scale)*u*u);
-
- for(unsigned j=0; j<3; ++j)
- out_col[j] = ((1-w)*m1_col[j]+w*m2_col[j])/n;
- }
- else
- {
- for(unsigned j=0; j<3; ++j)
- out_col[j] = (1-t)*m1_col[j]+t*m2_col[j];
- }
+ const KeyFrame::UniformMap &kf_uniforms = i->keyframe->get_uniforms();
+ const KeyFrame::UniformMap::const_iterator j = kf_uniforms.find(name);
+ if(j!=kf_uniforms.end())
+ knots.push_back(Knot(i->time/Time::sec, Interpolate::SplineValue<float, N>::make(j->second.values)));