Struct skeletal_animation::blend_tree::AnimBlendTree
source · [−]pub struct AnimBlendTree<T: Transform> { /* private fields */ }
Expand description
A tree of AnimNodes
Implementations
sourceimpl<T: Transform> AnimBlendTree<T>
impl<T: Transform> AnimBlendTree<T>
sourcepub fn from_def(
def: BlendTreeNodeDef,
animations: &HashMap<ClipId, Rc<AnimationClip<T>>>,
skeleton: Rc<Skeleton>
) -> AnimBlendTree<T>
pub fn from_def(
def: BlendTreeNodeDef,
animations: &HashMap<ClipId, Rc<AnimationClip<T>>>,
skeleton: Rc<Skeleton>
) -> AnimBlendTree<T>
Initialize a new AnimBlendTree from the root BlendTreeNodeDef and a mapping from animation names to AnimationClip
Arguments
def
- The root BlendTreeNodeDefanimations
- A mapping from ClipIds to shared AnimationClip instances
sourcepub fn get_output_pose(
&self,
time: f32,
params: &HashMap<String, f32>,
output_poses: &mut [T]
)
pub 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 AnimationClipsparams
- A mapping from ParamIds to their current parameter valuesoutput_poses
- The output array slice of joint transforms that will be populated according to the defined output for this BlendTreeNode
sourcepub fn synchronize(&mut self, global_time: f32, params: &HashMap<String, f32>)
pub 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 controllerparams
- A mapping from ParamIds to their current parameter values
Auto Trait Implementations
impl<T> RefUnwindSafe for AnimBlendTree<T> where
T: RefUnwindSafe,
impl<T> !Send for AnimBlendTree<T>
impl<T> !Sync for AnimBlendTree<T>
impl<T> Unpin for AnimBlendTree<T>
impl<T> UnwindSafe for AnimBlendTree<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