TerrainBuffer

Description

sealed class Tinman.Engine.Components.TerrainBuffer

The TerrainBuffer component is used as a shared buffer by zero or more TerrainMesh components.

TerrainBuffer objects act as resource handles and produce TerrainBufferResource resource objects.

Public / Constructors

Terrain​Buffer


public constructor TerrainBuffer → (2)

cache opt : PyramidFileCache own = null

The pyramid file cache or null.

options opt : TerrainBufferOptions = null

The terrain buffer options or null for default options.

Creates a new instance of TerrainBuffer.

The TerrainBufferOptions.CacheOptions and TerrainBufferOptions.CachePath properties are ignored by this method. Use TerrainBufferOptions.CreateTerrainBuffer if you want these to be taken into account.

Public / Methods

Clear​Cache


public method ClearCache → (1)

flags opt : ClearCacheFlags = ClearCacheFlags.File | ClearCacheFlags.Texel

The clear flags. The default value neither includes ClearCacheFlags.Cube nor ClearCacheFlags.Rect, which means that calls to TextureAtlas.Clear2 will not clear any cached content via IPyramidBase.ClearCaches.

Clears the terrain buffer caches.

The texel pyramid cache (see Cache) is cleared with PyramidFileCache.Clear if flags opt contains both ClearCacheFlags.File and ClearCacheFlags.Texel. Then the cache of each TextureAtlas object is cleared with TextureAtlas.Clear2, passing flags opt.

IOException

If an I/O error has occurred.

Public / Attributes

Cache


public attribute Cache → (get)

value : PyramidFileCache

The cache or null if none.

The wrapped PyramidFileCache object.

Flags


public attribute Flags → (get)

value : TerrainBufferFlags

The terrain buffer flags.

Returns the flags that have been used to create this terrain buffer.

Mesh​Buffer


public attribute MeshBuffer → (get)

value : MeshBuffer

[not-null]
The mesh buffer.

The wrapped MeshBuffer object.

Vertex​Layout


public attribute VertexLayout → (get)

value : VertexElements

[not-null]
The vertex buffer layout.

The layout of the shared vertex buffer.

The layout always uses the following VertexElementUsage semantics, in the given order: