Enum gltf_json::animation::Interpolation [−][src]
pub enum Interpolation {
Linear,
Step,
CubicSpline,
}
Expand description
Specifies an interpolation algorithm.
Variants
Linear
Linear interpolation.
The animated values are linearly interpolated between keyframes. When targeting a rotation, spherical linear interpolation (slerp) should be used to interpolate quaternions. The number output of elements must equal the number of input elements.
Step
Step interpolation.
The animated values remain constant to the output of the first keyframe, until the next keyframe. The number of output elements must equal the number of input elements.
CubicSpline
Cubic spline interpolation.
The animation’s interpolation is computed using a cubic spline with specified tangents. The number of output elements must equal three times the number of input elements. For each input element, the output stores three elements, an in-tangent, a spline vertex, and an out-tangent. There must be at least two keyframes when using this interpolation
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Interpolation
impl Send for Interpolation
impl Sync for Interpolation
impl Unpin for Interpolation
impl UnwindSafe for Interpolation
Blanket Implementations
Mutably borrows from an owned value. Read more