Vixen
c7401864

WaterBodyContribution

struct Core/Vixen.Water/WaterBody.cs:127
csharp
public readonly record struct WaterBodyContribution

What one body says about one place on the ground.

Read the guide page for this →

Remarks

⚠ Depth is not in here, and that is [§ D3](../../docs/plan/35-water.md#d3-the-water-info-texture-is-the-interchange-and-it-is-a-zone-render)'s rule. How deep the water is at a place is SurfaceHeight minus whatever the ground turns out to be, computed where it is used; storing it here would be a third number that can disagree with the two it came from. BedDepth is a different quantity — what the body would like the ground to be, which is what carving reads.

Fields and properties (6)

  • public float Coverage

    How much of this place the body claims, 0…1. Falls off across the shoreline band.

  • public float SurfaceHeight

    Where its surface is, in world units.

  • public Vector2 Flow

    How fast the water moves here, in metres per second, on the ground plane.

  • public float BedDepth

    How far below the surface the body wants the ground, in metres. Zero at the shoreline.

  • public float AudioIntensity

    How loud it is here, 0…1.

  • public static WaterBodyContribution None

    A body that says nothing about this place.

Methods (1)

  • public WaterBodyContribution(float Coverage, float SurfaceHeight, Vector2 Flow, float BedDepth, float AudioIntensity)

    What one body says about one place on the ground.

Used by (5)

  • WaterBodyVixen.Water
  • WaterCarveVixen.Water
  • WaterDebugDrawVixen.Rendering.Water
  • WaterFieldVixen.Water
  • WaterFieldTestsVixen.Water.Tests