Vixen
c7401864
csharp
public sealed class WaterWavesAsset

A sea state as a file: what a .vxwaves holds.

Read the guide page for this →

Remarks

The one new asset kind [35 § D6](../../docs/plan/35-water.md#d6-a-water-body-is-a-spline-and-a-profile-and-there-is-no-new-spline) admits, and the reason it is admitted is sharing. Every other water thing a scene carries is per-body or per-zone, so it goes in a component and moves with the entity. A sea state is neither: it is shared between every body in a region and between levels, so a coastline authored across four streamed sublevels would otherwise hold four copies of one wind and drift out of step the first time somebody edited three of them.

⚠ A wrapper around WaterWaveSpectrum rather than the spectrum itself, and the wrapper is what carries the name. A scene names this asset by name — see WaterZoneComponent.WaveAsset for why a name and not a handle — so the file has to hold one, and a bare spectrum has nowhere to put it.

⚠ It is deliberately not a list of waves. [§ D7](../../docs/plan/35-water.md#d7-waves-are-a-spectrum-summed-as-gerstner-and-the-fft-is-deferred-with-arithmetic) is explicit: wind, a spread, a wavelength range and a seed are the things somebody describing a sea has words for, and thirty-two amplitudes and phases are not. The waves are derived, on every host, from Seed — which is what makes a client and a server agree about where a boat is.

Fields and properties (3)

  • public const string Extension

    What a sea state is called on disk.

  • public string Name

    What it is called, which is what a zone names it by.

  • public WaterWaveSpectrum Spectrum

    The sea state itself.

Methods (1)

  • public string? Validate()

    Why this sea state cannot be summed, or if it can.

Used by (11)

  • AssetWaterSourceVixen.Engine.Renderer
  • AssetWaterSourceTestsVixen.Engine.Renderer.Tests
  • TypeRegistrationVixen.Water
  • Vixen_Water_WaterWavesAssetSerializerVixen.Water
  • WavesEntryVixen.Engine.Renderer
  • FileWavesVixen.Editor.Assets.Tests
  • WaterModuleVixen.Editor.Water
  • WaterSceneSourceVixen.Editor.Water
  • WaterWavesImporterVixen.Editor.Assets
  • WaterWavesImporterTestsVixen.Editor.Assets.Tests
  • WaterZoneSettingsVixen.Editor.Water