Crate minterpolate [] [src]

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

InterpolationFunction

Supported interpolation functions

Traits

InterpolationPrimitive

Interpolation primitive, defines basic arithmetic needed for interpolation.

Functions

catmull_rom_spline_interpolate

Catmull-Rom spline interpolation

cubic_spline_interpolate

Cubic Hermite spline interpolation

get_input_index

Calculate the keyframe index in the input collection

get_interpolation_factor

Calculate the keyframe index in the input collection, and the interpolation factor between the current keyframe and the next keyframe.

linear_interpolate

Do linear interpolation.

spherical_linear_interpolate

Do spherical linear interpolation.

step_interpolate

Do step interpolation.