Vixen
02b45cc4
csharp
public sealed class TerrainTileSource

A tile source over a terrain that is already in memory.

Read the guide page for this →

Remarks

⚠ Synchronous behind an asynchronous signature, and deliberately so. Compositing a tile's chain is arithmetic over arrays this object already holds; wrapping it in a thread would add a scheduling hop to a few microseconds of work. What the signature buys is that the file-backed source can replace this one without PageResidency changing.

Fields and properties (2)

  • public int TileSamples

    How many samples a tile is across, which fixes the page size.

  • public (int X, int Z) TileCounts

    How many tiles there are along each axis.

Methods (2)

  • public TerrainTileSource(Terrain terrain)

    Reads tiles out of a terrain.

  • public ValueTask<int> ReadAsync(int tileX, int tileZ, Memory<byte> destination, CancellationToken cancellation)

    Reads one tile's whole mip chain, packed level after level.

Used by (1)

  • TerrainStreamingTestsVixen.Rendering.Terrain.Tests