pub trait Slerp<Factor = f32>: Sized {
    type Output;

    // Required method
    fn slerp_unclamped(from: Self, to: Self, factor: Factor) -> Self::Output;

    // Provided method
    fn slerp(from: Self, to: Self, factor: Factor) -> Self::Output
       where Factor: Clamp<Factor> + Zero + One { ... }
}
Expand description

A value that can be Spherically Linearly interpolated.

The Output type allows this trait to be meaningfully implemented for &T as well as T.

Required Associated Types§

source

type Output

The resulting type after performing the SLERP operation.

Required Methods§

source

fn slerp_unclamped(from: Self, to: Self, factor: Factor) -> Self::Output

Performs spherical linear interpolation without implictly constraining factor to be between 0 and 1.

Provided Methods§

source

fn slerp(from: Self, to: Self, factor: Factor) -> Self::Outputwhere Factor: Clamp<Factor> + Zero + One,

Performs spherical linear interpolation, constraining factor to be between 0 and 1.

Implementors§

source§

impl<'a, T, Factor> Slerp<Factor> for &'a oxygengine_ha_renderer::math::quaternion::repr_simd::Quaternion<T>where T: Lerp<T, Output = T> + Add<T, Output = T> + Real, Factor: Into<T>,

source§

impl<'a, T, Factor> Slerp<Factor> for &'a oxygengine_ha_renderer::math::Quaternion<T>where T: Lerp<T, Output = T> + Add<T, Output = T> + Real, Factor: Into<T>,

source§

impl<T> Slerp<T> for oxygengine_ha_renderer::math::vec::repr_simd::Vec3<T>where T: Real<Output = T> + Clamp<T> + Lerp<T, Output = T> + Add<T>,

§

type Output = Vec3<T>

source§

impl<T> Slerp<T> for oxygengine_ha_renderer::math::vec::Vec3<T>where T: Real<Output = T> + Clamp<T> + Lerp<T, Output = T> + Add<T>,

§

type Output = Vec3<T>

source§

impl<T, Factor> Slerp<Factor> for oxygengine_ha_renderer::math::quaternion::repr_simd::Quaternion<T>where T: Lerp<T, Output = T> + Add<T, Output = T> + Real, Factor: Into<T>,

source§

impl<T, Factor> Slerp<Factor> for oxygengine_ha_renderer::math::Quaternion<T>where T: Lerp<T, Output = T> + Add<T, Output = T> + Real, Factor: Into<T>,