pub struct WaveParams {
pub amplitude: f32,
pub frequency: f32,
pub speed: f32,
/* private fields */
}Expand description
Parameters for wave. Default is a gentle ripple.
Each output coordinate is displaced by a sine of the other axis:
x += amplitude·cos(y·frequency·2π + speed·t) and then
y += amplitude·sin(x·frequency·2π + speed·t), so vertical lines wave
horizontally and vice versa. amplitude = 0 is the identity.
The animation is driven by frame timestamps (pts × time_base);
frames without timestamps render the t = 0 phase (a static ripple).
Fields§
§amplitude: f32Displacement as a fraction of the frame, 0.0..=0.05.
frequency: f32Ripple count across the frame, 0.0..=20.0 full cycles.
speed: f32Ripple travel speed in radians per second, 0.0..=50.0.
Trait Implementations§
Source§impl Clone for WaveParams
impl Clone for WaveParams
Source§fn clone(&self) -> WaveParams
fn clone(&self) -> WaveParams
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for WaveParams
Source§impl Debug for WaveParams
impl Debug for WaveParams
Source§impl Default for WaveParams
impl Default for WaveParams
Source§impl PartialEq for WaveParams
impl PartialEq for WaveParams
impl Pod for WaveParams
impl StructuralPartialEq for WaveParams
Auto Trait Implementations§
impl Freeze for WaveParams
impl RefUnwindSafe for WaveParams
impl Send for WaveParams
impl Sync for WaveParams
impl Unpin for WaveParams
impl UnsafeUnpin for WaveParams
impl UnwindSafe for WaveParams
Blanket Implementations§
impl<T> AnyBitPattern for Twhere
T: Pod,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.