Struct skeletal_animation::animation::AnimationClip [] [src]

pub struct AnimationClip<T: Transform> {
    pub samples: Vec<AnimationSample<T>>,
    pub samples_per_second: f32,

A sequence of skeletal pose samples at some sample rate



The sequence of skeletal poses


Sample rate for the clip. Assumes a constant sample rate.


impl<T: Transform> AnimationClip<T>

fn from_def(clip_def: &AnimationClipDef) -> AnimationClip<T>

fn set_duration(&mut self, duration: f32)

Overrides the sampling rate of the clip to give the given duration (in seconds).

fn get_duration(&self) -> f32

Return the duration of the clip in seconds

fn get_pose_at_time(&self, elapsed_time: f32, blended_poses: &mut [T])

Obtains the interpolated skeletal pose at the given sampling time.


  • time - The time to sample with, relative to the start of the animation
  • blended_poses - The output array slice of joint transforms that will be populated for each joint in the skeleton.

fn as_difference_clip(source_clip: &AnimationClip<T>, reference_clip: &AnimationClip<T>) -> AnimationClip<T>

Create a difference clip from a source and reference clip for additive blending.

fn from_collada(skeleton: &Skeleton, animations: &Vec<Animation>, transform: &Matrix4<f32>) -> AnimationClip<T>

Creates an AnimationClip from a collection of collada::Animation.


  • skeleton - The Skeleton that the AnimationClip will be created for.
  • animations - The collection of collada::Animations that will be converted into an AnimationClip, using the given Skeleton.
  • transform - An offset transform to apply to the root pose of each animation sample, useful for applying rotation, translation, or scaling when loading an animation.

Trait Implementations

Derived Implementations

impl<T: Debug + Transform> Debug for AnimationClip<T> where T: Debug

fn fmt(&self, __arg_0: &mut Formatter) -> Result