pub enum StatePlay {
Clip(ClipPlay),
Blend1D(Blend1D),
Blend2D(Blend2D),
}Expand description
What a compiled state plays.
Variants§
Clip(ClipPlay)
A single clip.
Blend1D(Blend1D)
A 1D blendspace over one parameter.
Blend2D(Blend2D)
A 2D blendspace over two parameters.
Implementations§
Source§impl StatePlay
impl StatePlay
Sourcepub fn sync(&self) -> bool
pub fn sync(&self) -> bool
Whether members share one normalized phase clock (foot-phase alignment). Single clips have nothing to sync against.
Sourcepub fn weights(&self, params: &[f32]) -> Vec<f32>
pub fn weights(&self, params: &[f32]) -> Vec<f32>
One weight per member at the given parameter values. A single clip is
always [1.0].
Sourcepub fn weights_into(&self, params: &[f32], out: &mut Vec<f32>)
pub fn weights_into(&self, params: &[f32], out: &mut Vec<f32>)
weights written into out (cleared first, so its capacity is
reused). The per-frame sampling path calls this with a persistent
scratch buffer so steady-state blending allocates nothing.
Sourcepub fn effective_duration(&self, weights: &[f32]) -> f32
pub fn effective_duration(&self, weights: &[f32]) -> f32
Weighted-average member duration: the length of one pass of the state at the given weights. Members with zero weight contribute nothing, so a pure-walk pose is one walk cycle long.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StatePlay
impl RefUnwindSafe for StatePlay
impl Send for StatePlay
impl Sync for StatePlay
impl Unpin for StatePlay
impl UnsafeUnpin for StatePlay
impl UnwindSafe for StatePlay
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more