Vixen
caa30e12
csharp
public sealed class WaterCarveCommand

Regenerating the terrain's reserved water layer, as one undo entry.

Read the guide page for this →

Remarks

The whole layer, because that is what non-destructive means — [§ D5](../../docs/plan/35-water.md#d5-carving-is-a-reserved-edit-layer-and-the-machinery-exists). Moving a body restores the ground it left and cuts the ground it arrived at in one operation, because the layer is deltas over ground it never touched.

⚠ The undo is a regeneration from the old body list, not a stored copy of the layer. A layer's deltas are sparse chunks over a whole terrain, and copying them per entry would put a heightfield's worth of memory on the undo stack for every drag of a width handle. Regenerating is deterministic — that is what "regenerated wholesale" is for — so the cheap thing and the correct thing are the same thing here.

Fields and properties (1)

  • public string Name

    What this is called in the undo history, as a person would say it.

Methods (3)