pub struct ExpressionBlender {
pub anchors: Vec<(String, f32)>,
}Expand description
Interpolate between multiple named expressions using (name, weight) anchors.
This is a generalised barycentric blender: each anchor contributes its preset’s weights scaled by the anchor weight, then all contributions are summed and clamped.
Fields§
§anchors: Vec<(String, f32)>(preset name, blending weight) pairs.
Implementations§
Source§impl ExpressionBlender
impl ExpressionBlender
Sourcepub fn add_anchor(&mut self, name: String, weight: f32)
pub fn add_anchor(&mut self, name: String, weight: f32)
Add an anchor (preset name, weight).
Trait Implementations§
Source§impl Clone for ExpressionBlender
impl Clone for ExpressionBlender
Source§fn clone(&self) -> ExpressionBlender
fn clone(&self) -> ExpressionBlender
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExpressionBlender
impl Debug for ExpressionBlender
Auto Trait Implementations§
impl Freeze for ExpressionBlender
impl RefUnwindSafe for ExpressionBlender
impl Send for ExpressionBlender
impl Sync for ExpressionBlender
impl Unpin for ExpressionBlender
impl UnsafeUnpin for ExpressionBlender
impl UnwindSafe for ExpressionBlender
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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