Vixen
caa30e12
csharp
public readonly record struct GerstnerWave

One Gerstner wave, as the evaluator consumes it.

Read the guide page for this →

Remarks

The runtime form. What an author edits is WaterWaveSpectrum, which generates these — that split is Unreal's simple-versus-spectrum generator pair collapsed into one thing, because a simple generator is a spectrum with a flat distribution and shipping both is shipping two mental models.

Frequency and speed are derived rather than stored. A deep-water gravity wave's speed follows from its wavelength — ω² = gk — and storing a third number that can disagree with the two it came from is the mistake [§ D3](../../docs/plan/35-water.md#d3-the-water-info-texture-is-the-interchange-and-it-is-a-zone-render) refuses for depth.

Fields and properties (8)

  • public Vector2 Direction

    Which way it travels, as a unit vector on the ground plane.

  • public float Wavelength

    Crest to crest, in metres.

  • public float Amplitude

    Half the crest-to-trough height, in metres.

  • public float Steepness

    How far the horizontal displacement goes, 0…1 of the theoretical maximum. At 1 the crest is a cusp and beyond it the surface folds through itself.

  • public float Phase

    Where in its cycle it is at time zero, in radians.

  • public const float Gravity

    Standard gravity, in metres per second squared.

  • public float WaveNumber

    The angular wavenumber, 2π ⁄ λ.

  • public float AngularFrequency

    The angular frequency, √(g k) — the deep-water dispersion relation.

Methods (1)

  • public GerstnerWave(Vector2 Direction, float Wavelength, float Amplitude, float Steepness, float Phase)

    One Gerstner wave, as the evaluator consumes it.

Used by (10)

  • BuoyancyTestsVixen.Water.Tests
  • WaterEvaluatorVixen.Water
  • WaterMeshRendererVixen.Rendering.Water
  • WaterQueryVixen.Water
  • WaterSurfaceMeshTestsVixen.Water.Tests
  • WaterSurfacePassVixen.Rendering.Water
  • WaterSurfaceSeamDeviceTestsVixen.Graphics.Golden.Tests
  • WaterWaveSpectrumVixen.Water
  • WaterWaveTestsVixen.Water.Tests
  • WaterZoneSettingsVixen.Editor.Water