Vixen
c7401864
csharp
public sealed class TerrainExtractionSystem

Turns the scene's TerrainComponent entities into the frame's terrain list.

Read the guide page for this →

As a system

Phase
PreRender

Remarks

LightExtractionSystem's shape, for the ground. The component holds names and numbers; the frame needs heightfields and placements; this is the walk between them, cleared and refilled every frame so a destroyed entity takes its landscape with it. The consumer is whatever compositor node holds the same TerrainSceneSource — wired through TerrainFactory, because the node is rebuilt per document load and this system is not.

In PreRender, ordered by its declared access. TransformSystem writes WorldTransform in the same phase and this reads it, so a terrain that moved this frame is drawn where it moved to.

⚠ A reference that has not resolved yet is left out, quietly; one that resolved to a broken rule is left out loudly. "Loading" is a state every level starts in and lasts a few frames; a GrassType whose own Validate refuses it would otherwise reach the scatter dispatch, which throws mid-frame — so it is dropped here and counted in RefusedGrass, where a person can read it beside the asset that caused it.

Fields and properties (7)

  • public ITerrainAssetSource? Assets

    What turns a component's reference into a heightfield, or null while nothing can.

  • public int TerrainCount

    How many terrains the last pass put in the list.

  • public int Waiting

    How many entities named a terrain or foliage asset that has not resolved.

  • public int RefusedGrass

    How many grass rules were dropped because their own validation refused them.

  • public int FoliageCount

    How many foliage volumes the last pass put in the list.

  • public int RefusedFoliage

    How many foliage volumes were dropped because a palette type refused itself.

  • public SystemAccess Access

Methods (3)

Used by (4)

  • ArenaThirdPersonShooter
  • PbrShowcaseGamePbrShowcase
  • TerrainNodeTestsVixen.Rendering.Terrain.Tests
  • WorldRendererVixen.Engine.Renderer