Enum gltf::animation::Interpolation
source · pub enum Interpolation {
Linear = 1,
Step = 2,
CubicSpline = 3,
}
Expand description
Specifies an interpolation algorithm.
Variants§
Linear = 1
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 = 2
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 = 3
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§
source§impl Clone for Interpolation
impl Clone for Interpolation
source§fn clone(&self) -> Interpolation
fn clone(&self) -> Interpolation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Interpolation
impl Debug for Interpolation
source§impl Default for Interpolation
impl Default for Interpolation
source§fn default() -> Interpolation
fn default() -> Interpolation
source§impl<'de> Deserialize<'de> for Interpolation
impl<'de> Deserialize<'de> for Interpolation
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Interpolation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Interpolation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for Interpolation
impl PartialEq for Interpolation
source§fn eq(&self, other: &Interpolation) -> bool
fn eq(&self, other: &Interpolation) -> bool
self
and other
values to be equal, and is used
by ==
.