Vixen
02b45cc4

FoliageGrowthSettings

struct Core/Vixen.Foliage/FoliageGrowth.cs:15
csharp
public readonly record struct FoliageGrowthSettings

What a simulation is asked to grow, and where.

Read the guide page for this →

Remarks

⚠ The seed is a setting rather than a default, because it is the one number an author re-rolls. "Grow me a different forest with the same rules" is the operation, and it is a different operation from changing the rules — which is why the seed is beside the region and not hidden inside the simulation.

Fields and properties (6)

  • public Vector2 Origin

    The low corner of the region, in world XZ.

  • public Vector2 Size

    How far it reaches, in metres.

  • public uint Seed

    What every random draw derives from.

  • public int Steps

    How many steps to run.

  • public int MaxPlants

    How many plants the region may hold before the simulation stops sowing.

  • public float Area

    How many square metres the region is.

Methods (3)

  • public static FoliageGrowthSettings Over(Vector2 origin, Vector2 size, uint seed = 2654435769)

    The settings a simulation over a region starts from.

  • public bool Contains(Vector2 at)

    Whether a position is inside the region.

  • public string? Validate()

    Why this cannot be simulated, or if it can.

Used by (5)

  • FoliageBlockerTestsVixen.Rendering.Terrain.Tests
  • FoliageGrowthVixen.Foliage
  • FoliageGrowthTestsVixen.Foliage.Tests
  • TerrainGrowthSettingsVixen.Editor.Terrain
  • TerrainPanelTestsVixen.Editor.App.Tests