pub struct AnimationClip(/* private fields */);Expand description
Immutable, cheaply cloned clip. Untracked properties retain the bank’s bind pose. Parent indices/hierarchy belong to the scene Skeleton, not the clip.
Implementations§
Source§impl AnimationClip
impl AnimationClip
pub fn new( joints: usize, duration: f32, mode: LoopMode, tracks: Vec<JointTrack>, events: Vec<AnimationEvent>, ) -> Result<AnimationClip, AnimationError>
pub fn joint_count(&self) -> usize
pub fn duration(&self) -> f32
pub fn mode(&self) -> LoopMode
pub fn events(&self) -> &EventTrack
Sourcepub fn sample_into(
&self,
time: f32,
bind: &[Transform],
out: &mut [Transform],
) -> Result<(), AnimationError>
pub fn sample_into( &self, time: f32, bind: &[Transform], out: &mut [Transform], ) -> Result<(), AnimationError>
Allocation-free sampling. Input errors leave output unchanged.
Trait Implementations§
Source§impl Clone for AnimationClip
impl Clone for AnimationClip
Source§fn clone(&self) -> AnimationClip
fn clone(&self) -> AnimationClip
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AnimationClip
impl RefUnwindSafe for AnimationClip
impl Send for AnimationClip
impl Sync for AnimationClip
impl Unpin for AnimationClip
impl UnwindSafe for AnimationClip
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