public interface ITerrainAssetSourceTurns the names a scene carries into the objects a frame draws from.
Remarks
ITerrainScene's runtime sibling, one seam earlier. That interface answers "what terrains should this viewport draw" with heightfields already in hand, which is the editor's shape — it owns a project directory and reads files. A game world holds only names, and turning a name into a heightfield means an asset manager, a cache and a "not yet" answer while bytes are in flight — none of which belongs beside an ECS query. Vixen.Engine.Renderer's AssetTerrainSource is the implementation, for the reason AssetTerrainTextures lives there: it is the assembly where the asset system and the render system meet.
⚠ Nothing here waits. A load is started on the first ask and the answer is null until it lands; the extraction system leaves the entity out of the frame and asks again next frame — AssetMeshSource's contract, for the same reason: a synchronous read inside extraction stalls the first frame of a level on every terrain in it.
Methods (4)
Terrain? Terrain(string reference)The terrain a reference names, or null while it is loading or unloadable.
GrassType? Grass(string reference)The grass type a reference names, or null on the same terms.
FoliageType? Foliage(string reference)The foliage type a .vxfoliage reference names, or null on the same terms.
FoliageVolume? Volume(string reference, IReadOnlyList<FoliageType> palette)The instance volume a .vxfol reference names, or null on the same terms.
Used by (3)
- AssetTerrainSourceVixen.Engine.Renderer
- OneOfEachVixen.Rendering.Terrain.Tests
- TerrainExtractionSystemVixen.Rendering.Terrain