pub struct PadPoint {
pub pleasure: f32,
pub arousal: f32,
pub dominance: f32,
}Expand description
A point in PAD (Pleasure-Arousal-Dominance) space.
All dimensions are in the range [-1.0, 1.0].
Fields§
§pleasure: f32Pleasure/Valence: -1 = very negative affect, +1 = very positive affect.
arousal: f32Arousal: -1 = completely calm/sleepy, +1 = highly excited/stimulated.
dominance: f32Dominance: -1 = submissive/controlled, +1 = dominant/in-control.
Implementations§
Source§impl PadPoint
impl PadPoint
Sourcepub fn lerp(&self, other: &PadPoint, t: f32) -> PadPoint
pub fn lerp(&self, other: &PadPoint, t: f32) -> PadPoint
Linear interpolation between self and other by factor t (0 = self, 1 = other).
Sourcepub fn surprised() -> Self
pub fn surprised() -> Self
Surprised: mildly positive pleasure, high arousal, slightly submissive.
Sourcepub fn contemptuous() -> Self
pub fn contemptuous() -> Self
Contemptuous: mildly negative pleasure, low arousal, dominant.
Trait Implementations§
impl Copy for PadPoint
impl StructuralPartialEq for PadPoint
Auto Trait Implementations§
impl Freeze for PadPoint
impl RefUnwindSafe for PadPoint
impl Send for PadPoint
impl Sync for PadPoint
impl Unpin for PadPoint
impl UnsafeUnpin for PadPoint
impl UnwindSafe for PadPoint
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