Vixen
02b45cc4
csharp
public readonly record struct TerrainFacts

What a new terrain costs, computed from the form as it is being filled in.

Read the guide page for this →

Remarks

The (derived) readout convention, from [20 § B6]'s lighting panel, and it belongs here more than there. This is the dialog where a person accidentally asks for eight gigabytes: four numbers that each look reasonable multiply into a terrain nothing can load, and the multiplication is not one anybody does in their head.

⚠ MetresPerStep is here because the height range is authored. Unreal fixes the range and nobody has to think about it; [§ D2] lets the author set it, which buys a 40 m rolling landscape 0.6 mm of vertical precision instead of 8 mm — and makes it possible to ask for a 20 km range and wonder later why a flatten will not settle. The number that answers that has to be on the form.

Fields and properties (7)

  • public float WidthX

    How far it reaches along X, in metres.

  • public float WidthZ

    And along Z.

  • public long Samples

    How many height samples it has in total.

  • public long HeightBytes

    What those samples occupy.

  • public long WeightBytesPerLayer

    What one paint layer adds.

  • public int Tiles

    How many tiles, which is how many collision shapes.

  • public float MetresPerStep

    What one step of the 16-bit height range is, in metres.

Methods (3)

  • public TerrainFacts(float WidthX, float WidthZ, long Samples, long HeightBytes, long WeightBytesPerLayer, int Tiles, float MetresPerStep)

    What a new terrain costs, computed from the form as it is being filled in.

  • public static TerrainFacts Of(in TerrainDescription description)

    What a description costs.

  • public IReadOnlyList<(string Label, string Value)> Rows()

    The rows the panel draws, each already labelled as derived.

Used by (3)

  • TerrainCreateSettingsVixen.Editor.Terrain
  • TerrainModuleVixen.Editor.Terrain
  • TerrainPanelTestsVixen.Editor.Terrain.Tests