pub struct ParamTrack {
pub param_name: String,
pub keyframes: Vec<Keyframe>,
pub loop_mode: LoopMode,
pub pre_infinity: f32,
pub post_infinity: f32,
}Expand description
Animation track for one named parameter.
Fields§
§param_name: StringName of the parameter this track controls.
keyframes: Vec<Keyframe>Keyframes sorted by ascending time.
loop_mode: LoopModeLoop behaviour.
pre_infinity: f32Value returned before the first keyframe (when loop_mode == Clamp).
post_infinity: f32Value returned after the last keyframe (when loop_mode == Clamp).
Implementations§
Source§impl ParamTrack
impl ParamTrack
Sourcepub fn add_keyframe(&mut self, kf: Keyframe)
pub fn add_keyframe(&mut self, kf: Keyframe)
Append a keyframe (will be sorted when sort_keyframes is called, or
evaluate will sort implicitly on the first call).
Sourcepub fn sort_keyframes(&mut self)
pub fn sort_keyframes(&mut self)
Sort keyframes by ascending time.
Sourcepub fn frame_count(&self) -> usize
pub fn frame_count(&self) -> usize
Number of keyframes.
Auto Trait Implementations§
impl Freeze for ParamTrack
impl RefUnwindSafe for ParamTrack
impl Send for ParamTrack
impl Sync for ParamTrack
impl Unpin for ParamTrack
impl UnsafeUnpin for ParamTrack
impl UnwindSafe for ParamTrack
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