Struct skeletal_animation::controller::AnimationController [−][src]
pub struct AnimationController<T: Transform> { /* fields omitted */ }Expand description
A runtime representation of an Animation State Machine, consisting of one or more AnimationStates connected by AnimationTransitions, where the output animation pose depends on the current state or any active transitions between states.
Implementations
pub fn new(
controller_def: AnimationControllerDef,
skeleton: Rc<Skeleton>,
animations: &HashMap<ClipId, Rc<AnimationClip<T>>>
) -> AnimationController<T>
pub fn new(
controller_def: AnimationControllerDef,
skeleton: Rc<Skeleton>,
animations: &HashMap<ClipId, Rc<AnimationClip<T>>>
) -> AnimationController<T>
Create an AnimationController instance from its definition, the desired skeleton, and a collection of currently loaded animation clips.
Update the controller’s local clock with the given time delta
Set the playback speed for the controller
Set the value for the given controller parameter
Return the value for the given controller parameter
Return a read-only reference to the controller parameter map
pub fn get_output_pose<TOutput: Transform + FromTransform<T>>(
&mut self,
ext_dt: f64,
output_poses: &mut [TOutput]
)
pub fn get_output_pose<TOutput: Transform + FromTransform<T>>(
&mut self,
ext_dt: f64,
output_poses: &mut [TOutput]
)
Calculate global skeletal joint poses for the given time since last update