pub struct EmotionVector {
pub joy: f32,
pub sadness: f32,
pub anger: f32,
pub fear: f32,
pub surprise: f32,
pub disgust: f32,
pub contempt: f32,
}Expand description
Emotion vector - continuous blend of basic emotions
Fields§
§joy: f32Joy/happiness [0.0 - 1.0]
sadness: f32Sadness [0.0 - 1.0]
anger: f32Anger [0.0 - 1.0]
fear: f32Fear [0.0 - 1.0]
surprise: f32Surprise [0.0 - 1.0]
disgust: f32Disgust [0.0 - 1.0]
contempt: f32Contempt [0.0 - 1.0]
Implementations§
Source§impl EmotionVector
impl EmotionVector
Sourcepub fn blend(&self, other: &EmotionVector, factor: f32) -> EmotionVector
pub fn blend(&self, other: &EmotionVector, factor: f32) -> EmotionVector
Blend with another emotion vector
Sourcepub fn normalize(&self) -> EmotionVector
pub fn normalize(&self) -> EmotionVector
Normalize so all values sum to 1.0
Trait Implementations§
Source§impl Clone for EmotionVector
impl Clone for EmotionVector
Source§fn clone(&self) -> EmotionVector
fn clone(&self) -> EmotionVector
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 EmotionVector
impl Debug for EmotionVector
Source§impl Default for EmotionVector
impl Default for EmotionVector
Source§fn default() -> EmotionVector
fn default() -> EmotionVector
Returns the “default value” for a type. Read more
impl Copy for EmotionVector
Auto Trait Implementations§
impl Freeze for EmotionVector
impl RefUnwindSafe for EmotionVector
impl Send for EmotionVector
impl Sync for EmotionVector
impl Unpin for EmotionVector
impl UnsafeUnpin for EmotionVector
impl UnwindSafe for EmotionVector
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