Skip to main content

gerstner_wave

Function gerstner_wave 

Source
pub fn gerstner_wave(pos: Vec2, time: f32, waves: &[OceanWave]) -> Vec3
Expand description

Compute Gerstner wave displacement at horizontal position pos and time time.

Returns a Vec3 where (x, y, z) correspond to (horizontal offset x, height y, horizontal offset z).