pub struct GerstnerWave {
pub dir: [f32; 2],
pub k: f32,
pub amp: f32,
pub omega: f64,
pub phase0: f64,
pub q: f32,
}Expand description
One Gerstner wave. All fields precomputed at spectrum generation.
Fields§
§dir: [f32; 2]Unit travel direction in XZ.
k: f32Wavenumber k = 2π/λ.
amp: f32Amplitude in meters.
omega: f64Angular frequency ω = √(g·k) (rad/s), stored f64 for phase precision.
phase0: f64Initial phase offset φ₀ in radians.
q: f32Steepness Q (already normalized against the whole spectrum).
Trait Implementations§
Source§impl Clone for GerstnerWave
impl Clone for GerstnerWave
Source§fn clone(&self) -> GerstnerWave
fn clone(&self) -> GerstnerWave
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 GerstnerWave
impl Debug for GerstnerWave
impl Copy for GerstnerWave
Auto Trait Implementations§
impl Freeze for GerstnerWave
impl RefUnwindSafe for GerstnerWave
impl Send for GerstnerWave
impl Sync for GerstnerWave
impl Unpin for GerstnerWave
impl UnwindSafe for GerstnerWave
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