pub struct ExpressionMixer { /* private fields */ }Expand description
The expression mixer: stacks layers and produces a final morph weight map.
Implementations§
Source§impl ExpressionMixer
impl ExpressionMixer
pub fn new() -> Self
pub fn add_layer(&mut self, layer: MixLayer)
Sourcepub fn remove_layer(&mut self, name: &str) -> bool
pub fn remove_layer(&mut self, name: &str) -> bool
Remove layer by name; returns true if found and removed.
Sourcepub fn set_blend(&mut self, name: &str, blend: f32) -> bool
pub fn set_blend(&mut self, name: &str, blend: f32) -> bool
Set blend factor for the named layer; returns true if found.
pub fn layer_count(&self) -> usize
Sourcepub fn evaluate(&self) -> MorphWeightMap
pub fn evaluate(&self) -> MorphWeightMap
Evaluate all layers in order to produce a final morph weight map.
- Additive layers: add
weight * layer.blendto each key. - Override layers: lerp current value toward layer’s weight by
layer.blend.
pub fn clear(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExpressionMixer
impl RefUnwindSafe for ExpressionMixer
impl Send for ExpressionMixer
impl Sync for ExpressionMixer
impl Unpin for ExpressionMixer
impl UnsafeUnpin for ExpressionMixer
impl UnwindSafe for ExpressionMixer
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more