RippleWave
struct · ferroui-base · v0.5.0
struct RippleWave
One ripple of the water ripple: a ring that spreads from its centre as it
ages and fades out (Effector's RippleWaveState).
Members
center
center: crate::Point
The centre, normalized to the area (0 to 1 on each axis).
age
age: f64
The age, 0 (just made) to 1.25 (gone); the ring has spread over
max-radius of the area at an age of 1.
strength
strength: f64
The strength, 0 to 1.
LIFETIME
const LIFETIME: f64
The age at which a ripple is gone.
INACTIVE
const INACTIVE: Self
A ripple that is not there (Effector's RippleWaveState.Inactive).
new
fn new(center: Point, strength: f64) -> Self
A new ripple at center (clamped to the area) of strength (clamped
to 0..1).
is_active
fn is_active(self: &Self) -> bool
Whether the ripple is there.
advance
fn advance(self: Self, delta: f64) -> Self
The ripple aged by delta (an active ripple only).
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafePropertyValueAnyValueClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedErasedDestructorIntoEitherCloneCopyDebugStructuralPartialEqPartialEqDefault
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.