public sealed class TerrainGrowthSettingsThe growth section of the foliage panel — what [docs/plan/31 § T9]'s four sliders are.
Remarks
A mutable settings object beside the immutable FoliageGrowthSettings, for TerrainBrushSettings's reason: a simulation has to be the same settings from its first step to its last, so what a panel edits and what a run is begun with are two objects and ToSettings is where they meet.
⚠ The seed is a field and not a hidden number, and that is the whole feature. "The same rules, a different forest" is what a procedural forest is for; a generator that reseeded itself every run would make an author who liked what they saw unable to get it back, and one that never reseeded would make every hillside the same hillside.
⚠ The plant cap is announced rather than silent. Spread is exponential until shade catches up with it, so a region an author made ten times too large is ten thousand times the plants — and a simulation that quietly stopped sowing reads as a rule that stopped working. Capped is what the panel shows instead.
Fields and properties (11)
public const float MinimumSizeThe smallest region worth simulating, in metres on a side.
public const float MaximumSizeAnd the largest a panel offers, which is a kilometre.
public float OriginXWhere the region's low corner is, along X.
public float OriginZAnd along Z.
public float SizeXHow far the region reaches along X, in metres.
public float SizeZAnd along Z.
public int StepsHow many steps to run.
public int SeedWhat every random draw derives from.
public int MaxPlantsHow many plants the region may hold before the simulation stops sowing.
public bool ReplaceWhether an existing scatter layer is emptied before the run.
public bool IsValidWhether a run would be accepted.
Methods (3)
public FoliageGrowthSettings ToSettings()What a run of these settings is.
public string? Validate()What is wrong with these settings, or if nothing is.
public void CentreOn(Vector2 centre)Centres the region on a place, keeping its size.
Used by (3)
- Describes_Vixen_Editor_Terrain_TerrainGrowthSettingsVixen.Editor.Terrain
- TerrainModuleVixen.Editor.Terrain
- TerrainPanelTestsVixen.Editor.App.Tests