Crate minterpolate

source ·
Expand description

Data set interpolation for mint Vector3 and Quaternion.

Can be extended by users to provide their own data types to interpolate over, using the InterpolationPrimitive trait.

Examples

use minterpolate::catmull_rom_spline_interpolate;

let input = vec![0., 1., 2., 3., 4.];
let output = vec![
    [1., 0., 0.],
    [0., 0., 0.],
    [1., 0., 0.],
    [0., 0., 0.],
    [-1., 0., 0.],
    [0., 0., 0.],
    [-1., 0., 0.],
];
catmull_rom_spline_interpolate(0.5, &input, &output, false);

Enums

Supported interpolation functions

Traits

Interpolation primitive, defines basic arithmetic needed for interpolation.

Functions

Catmull-Rom spline interpolation
Cubic Hermite spline interpolation
Calculate the keyframe index in the input collection
Calculate the keyframe index in the input collection, and the interpolation factor between the current keyframe and the next keyframe.
Do linear interpolation.
Do quasi spherical linear interpolation.
Do spherical linear interpolation.
Do step interpolation.