Skip to content
  • Emmanuele Bassi's avatar
    Add interpolation for matrices · 22ce4409
    Emmanuele Bassi authored
    Interpolating between two transformations expressed using a 3D matrix
    can be achieved by decomposing the matrices into their transformations
    and do a simple numeric interpolation between the initial and final
    states, like we do for other data types.
    
    Luckily for us, the CSS Transforms specification from the W3C provides
    the decomposition algorithm, using the "unmatrix" code taken from the
    book "Graphics Gems II, edited by Jim Arvo".
    
    Once the matrices have been decomposed, we can simply interpolate the
    transformations, and re-apply them onto the result matrix, using the
    facilities that Clutter provides for interpolating between two known
    GTypes.
    22ce4409