Struct skeletal_animation::blend_tree::AnimBlendTree [] [src]

pub struct AnimBlendTree<T: Transform> {
    // some fields omitted
}

A tree of AnimNodes

Methods

impl<T: Transform> AnimBlendTree<T>

fn from_def(def: BlendTreeNodeDef, animations: &HashMap<ClipId, Rc<AnimationClip<T>>>) -> AnimBlendTree<T>

Initialize a new AnimBlendTree from the root BlendTreeNodeDef and a mapping from animation names to AnimationClip

Arguments

  • def - The root BlendTreeNodeDef
  • animations - A mapping from ClipIds to shared AnimationClip instances

fn get_output_pose(&self, time: f32, params: &HashMap<String, f32>, output_poses: &mut [T])

Get the output skeletal pose from the blend tree for the given time and parameters

Arguments

  • time - The time to sample from any AnimationClips
  • params - A mapping from ParamIds to their current parameter values
  • output_poses - The output array slice of joint transforms that will be populated according to the defined output for this BlendTreeNode

fn synchronize(&mut self, global_time: f32, params: &HashMap<String, f32>)

For each LerpNode with two animation clips, synchronize their playback rates according to the blend parameter

Arguments

  • global_time - The current global clock time from the controller
  • params - A mapping from ParamIds to their current parameter values