Vixen
02b45cc4
csharp
public sealed class TerrainGrassSettings

The grass section of the terrain panel — the numbers that are a rule rather than a tool.

Read the guide page for this →

Remarks

[docs/plan/31 § D8]'s consequence, spelled as chrome. Grass is derived: nothing about a blade is in any file, and a person does not paint it — they change the rule that produces it and the whole field re-scatters. So there is no grass mode, no brush and no stroke; there is a settings object beside the terrain panel, and a fifth viewport mode would have been a mode with nothing to click on.

⚠ The density scalar multiplies and never reshuffles. Lowering it removes a subset of the blades that were there and moves none of the rest, because every candidate keeps its own draw — a scalar that rearranged would make a quality slider look like a different level. Both halves of the scatter are written that way and this is the control that depends on it.

⚠ The wind is authored per type and scaled here, which is the same division. A .vxgrass says what its grass is like in a breeze; a scene says how much breeze there is. Putting the whole profile on the panel would make every field on the level share one flutter, and putting the scale on the asset would make a calm day a re-import.

Fields and properties (9)

  • public const float MaximumRange

    The largest range a panel offers, in metres.

  • public bool IsEnabled

    Whether grass is scattered at all.

  • public float Density

    What fraction of each field to keep, 0…1.

  • public float Range

    How far from the camera cells are kept resident, in metres.

  • public float Wind

    How much of each type's authored wind to apply, 0…2.

  • public float Bearing

    Which way the wind blows, in degrees clockwise from north.

  • public int BladesPerCell

    How many blades one cell's run holds.

  • public Vector2 Direction

    The direction the bearing means, as the kernel takes it.

  • public float DensityScale

    What fraction of the candidates survive, given the switch and the scalar.

Methods (3)

  • public GrassWind Apply(in GrassWind wind)

    A type's wind, with this scene's strength and bearing applied.

  • public long RingBytes(float cellSize = 32, int instanceBytes = 48)

    How many bytes the ring is, at this range and this cell size.

  • public string? Validate()

    What is wrong with these settings, or if nothing is.

Used by (3)

  • Describes_Vixen_Editor_Terrain_TerrainGrassSettingsVixen.Editor.Terrain
  • TerrainModuleVixen.Editor.Terrain
  • TerrainPanelTestsVixen.Editor.App.Tests