Struct skeletal_animation::animation::ClipInstance
source · [−]pub struct ClipInstance<T: Transform> {
pub clip: Rc<AnimationClip<T>>,
pub start_time: f32,
pub playback_rate: f32,
pub time_offset: f32,
}
Expand description
An instance of an AnimationClip which tracks playback parameters
Fields
clip: Rc<AnimationClip<T>>
Shared clip reference
start_time: f32
Controller clock time at animation start
playback_rate: f32
Playback rate modifier, where 1.0 is original speed
time_offset: f32
Used to account for changes in playback rate
Implementations
sourceimpl<T: Transform> ClipInstance<T>
impl<T: Transform> ClipInstance<T>
pub fn new(clip: Rc<AnimationClip<T>>) -> ClipInstance<T>
sourcepub fn set_playback_rate(&mut self, global_time: f32, new_rate: f32)
pub fn set_playback_rate(&mut self, global_time: f32, new_rate: f32)
Adjust the playback rate of the clip without affecting the value of get_local_time for a given global time.
pub fn get_pose_at_time(&self, global_time: f32, blended_poses: &mut [T])
pub fn get_duration(&self) -> f32
Auto Trait Implementations
impl<T> RefUnwindSafe for ClipInstance<T> where
T: RefUnwindSafe,
impl<T> !Send for ClipInstance<T>
impl<T> !Sync for ClipInstance<T>
impl<T> Unpin for ClipInstance<T>
impl<T> UnwindSafe for ClipInstance<T> where
T: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more