pub struct AnimationMixer3D { /* private fields */ }Expand description
Multi-layer glTF 2.0 & Blender NLA animation mixer supporting STEP/LINEAR/CUBICSPLINE channels, morph weights, and zero-allocation ticking.
Implementations§
Source§impl AnimationMixer3D
Multi-layer glTF/NLA animation mixing and zero-allocation scene-graph application for AnimationMixer3D.
impl AnimationMixer3D
Multi-layer glTF/NLA animation mixing and zero-allocation scene-graph application for AnimationMixer3D.
Sourcepub fn capture_rest_pose(&mut self, scene_graph: &SceneGraph3D)
pub fn capture_rest_pose(&mut self, scene_graph: &SceneGraph3D)
Captures the current SceneGraph3D local transforms and morph weights as the bind/rest pose and pre-reserves scratch buffers.
§Arguments
&Self- Mutable animation mixer.&SceneGraph3D- Scene graph in its rest pose.
Sourcepub fn add_clip(&mut self, clip: ImportedAnimationClip3D) -> usize
pub fn add_clip(&mut self, clip: ImportedAnimationClip3D) -> usize
Sourcepub fn push_layer(&mut self, layer: NlaLayer3D) -> usize
pub fn push_layer(&mut self, layer: NlaLayer3D) -> usize
Sourcepub fn crossfade_layer(
&mut self,
layer_index: usize,
target_weight: f32,
duration_secs: f32,
) -> bool
pub fn crossfade_layer( &mut self, layer_index: usize, target_weight: f32, duration_secs: f32, ) -> bool
Sourcepub fn clear_layers(&mut self)
pub fn clear_layers(&mut self)
Removes all active NLA playback layers while preserving registered clips and captured rest pose.
Sourcepub fn advance_and_apply(
&mut self,
dt_secs: f32,
scene_graph: &mut SceneGraph3D,
) -> usize
pub fn advance_and_apply( &mut self, dt_secs: f32, scene_graph: &mut SceneGraph3D, ) -> usize
Advances all enabled NLA layers by dt_secs, mixes Override and Additive channels into reusable SoA scratch buffers, and writes modified TRS and morph weights directly into scene_graph with zero steady-state heap allocations.
§Arguments
&Self- Mutable animation mixer.f32- Elapsed frame delta time in seconds.&mut SceneGraph3D- Target scene graph updated in place.
§Returns
usize- Number of scene nodes or morph channels updated during this tick.
Source§impl AnimationMixer3D
Implements impl #impl_generics #name #ty_generics #where_clause.
impl AnimationMixer3D
Implements impl #impl_generics #name #ty_generics #where_clause.