Enum gltf_json::animation::Interpolation
source · pub enum Interpolation {
Linear = 1,
Step = 2,
CatmullRomSpline = 3,
CubicSpline = 4,
}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.
CatmullRomSpline = 3
Uniform Catmull-Rom spline interpolation.
The animation’s interpolation is computed using a uniform Catmull-Rom spline. The number of output elements must equal two more than the number of input elements. The first and last output elements represent the start and end tangents of the spline. There must be at least four keyframes when using this interpolation.
CubicSpline = 4
Cubic spline interpolation.
The animation’s interpolation is computed using a uniform Catmull-Rom spline. The number of output elements must equal two more than the number of input elements. The first and last output elements represent the start and end tangents of the spline. There must be at least four 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§impl<'de> Deserialize<'de> for Interpolation
impl<'de> Deserialize<'de> for Interpolation
source§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>,
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 ==.source§impl Serialize for Interpolation
impl Serialize for Interpolation
impl Copy for Interpolation
impl Eq for Interpolation
impl StructuralPartialEq for Interpolation
Auto Trait Implementations§
impl Freeze for Interpolation
impl RefUnwindSafe for Interpolation
impl Send for Interpolation
impl Sync for Interpolation
impl Unpin for Interpolation
impl UnwindSafe for Interpolation
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)