pub struct EmotionTransition {
pub from: PadPoint,
pub to: PadPoint,
pub duration_seconds: f32,
}Expand description
A time-parameterised transition between two PAD points.
Fields§
§from: PadPointStarting PAD state.
to: PadPointTarget PAD state.
duration_seconds: f32Total transition duration in seconds.
Implementations§
Source§impl EmotionTransition
impl EmotionTransition
Sourcepub fn evaluate(&self, t_seconds: f32) -> PadPoint
pub fn evaluate(&self, t_seconds: f32) -> PadPoint
Evaluate the transition at t_seconds using linear interpolation.
t_seconds is clamped to [0, duration_seconds].
Sourcepub fn evaluate_smooth(&self, t_seconds: f32) -> PadPoint
pub fn evaluate_smooth(&self, t_seconds: f32) -> PadPoint
Evaluate the transition at t_seconds using smoothstep interpolation.
Provides ease-in / ease-out behaviour. t_seconds is clamped to the
duration range.
Auto Trait Implementations§
impl Freeze for EmotionTransition
impl RefUnwindSafe for EmotionTransition
impl Send for EmotionTransition
impl Sync for EmotionTransition
impl Unpin for EmotionTransition
impl UnsafeUnpin for EmotionTransition
impl UnwindSafe for EmotionTransition
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
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more