Vixen
caa30e12
csharp
public sealed class WaterDebugDraw

What WaterDebug's five world-space verbs actually draw.

Read the guide page for this →

Remarks

[35 § Part 2 § Debugging](../../docs/plan/35-water.md#debugging), and the half that was owed. stat water and stat watermesh needed only numbers somebody already publishes and shipped with the mode; these needed lines, and water had no seam into a viewport line pass. It turns out it did not need one — DebugDraw is exactly that seam, and it is the accumulator rather than the renderer, so this assembly draws into it without knowing what a line pass is.

⚠ Five and not six. water.showBuoyancy lives in Vixen.Water.Physics, because the pontoons and the forces are that assembly's and this one must not reference it — § D1 puts the physics join in its own assembly precisely so that nothing linking Jolt is linked by a renderer. The flag is here because the console verb is; the drawing is where the data is.

⚠ Every draw reads the frame's own answer rather than recomputing one. The patches come from Selected, the surface from the zone's WaterQuery, the window from the field that was rasterised. A debug overlay that descended the quadtree again, or evaluated the waves at its own time, would agree with the frame until the moment it stopped — and that moment is exactly the bug somebody turned the overlay on to find.

Nothing here allocates per line. DebugDraw appends into three lists it owns; what this adds is a bounded walk over the patches a frame actually drew.

Fields and properties (5)

  • public int GridSamples

    How many samples across a zone's window the flow and info grids take.

  • public float FlowScale

    How long an arrow one metre a second of flow draws, in metres.

  • public float Lift

    How far above the surface the overlays are lifted, in metres.

  • public Vector2 ChartOrigin

    Where the info channels are charted, in pixels from the top-left.

  • public Vector2 ChartSize

    How large each channel's row is, in pixels.

Methods (3)

Used by (2)

  • WaterDebugDrawTestsVixen.Rendering.Water.Tests
  • WaterPresenterVixen.Editor.App