Vixen
02b45cc4
csharp
public sealed class TerrainCreateSettings

The create and manage section of the terrain panel.

Read the guide page for this →

Remarks

[docs/plan/31 § The terrain panel], as a settings object rather than as dialog code. Every row is an [Inspector] member of a [DataContract] type, which is [20 § B6]'s bargain for world settings and is what makes the form testable without a window.

⚠ The tile size is offered in quads and stored in samples. An artist reads "63 / 127 / 255", because that is what both references call it and because it is the number of quads a section spans; Jolt requires a power-of-two sample count and rejects anything else by returning nothing at all. The two differ by one and the form is where the translation happens, once — see [§ D2].

Fields and properties (11)

  • public static IReadOnlyList<int> TileQuadChoices

    The tile sizes the form offers, in quads.

  • public int TileSamples

    How many samples a tile spans, along each axis. A power of two.

  • public int TilesX

    How many tiles across.

  • public int TilesZ

    How many tiles deep.

  • public float MetresPerQuad

    How far apart two samples are, in metres.

  • public float MinHeight

    The lowest height the terrain can hold, in metres.

  • public float MaxHeight

    And the highest.

  • public float BaseHeight

    What the ground starts at, in metres.

  • public TerrainDescription Description

    What the form describes.

  • public TerrainFacts Facts

    What it costs, as the form is being filled in.

  • public bool IsValid

    Whether the form can be submitted.

Methods (4)

  • public string? Validate()

    Why the form cannot be submitted, or if it can.

  • public Terrain Build()

    Builds the terrain the form describes.

  • public static TerrainCreateSettings Of(Terrain terrain)

    Fills the form in from a terrain that already exists, for the manage section.

  • public string? Consequence(Terrain terrain)

    What applying the form to an existing terrain would do to it.

Used by (6)

  • Describes_Vixen_Editor_Terrain_TerrainCreateSettingsVixen.Editor.Terrain
  • SculptSessionTestsVixen.Editor.Terrain.Tests
  • TerrainModeVixen.Editor.Terrain
  • TerrainModeTestsVixen.Editor.Terrain.Tests
  • TerrainModuleVixen.Editor.Terrain
  • TerrainPanelTestsVixen.Editor.Terrain.Tests