MeshChunk

Description

sealed class Tinman.Terrain.Kernel.MeshChunk

Derived from

Disposable abstract
IMesh
ICapacity

A static mesh chunk.

The mesh vertices are specified in terrain-space (see Semantic.Position). However, a local coordinate system (see Matrix) around the mesh chunk center vertex (see Sector) is provided, as defined by the ComputeLocal method family of the IGeometry interface.

See also

MeshChunkBuilder

Public / Methods

Index​Range


[Pure]
public method IndexRange → (1)

quadrant in : int32

[-1..3]
The quadrant or -1 for the whole chunk.

returns → RangeI

The index range of the chunk in Indices.

Returns the index range of the given terrain mesh chunk quadrant.

Public / Attributes

Index​Mode


public attribute IndexMode → (get)

value : int32

[0..2]
The index mode, see MeshChunkBuilder.IndexMode.

The index mode that has been used to create this mesh chunk.

Indices


public attribute Indices → (get)

value : int32 [ ]

[not-null]
The triangle strip, created with default TriangulationBuffer options.

Returns a triangle strip for this mesh chunk.

Matrix


public attribute Matrix → (get)

value : Mat4D

The transformation matrix.

The transformation from local chunk coordinates to terrain-space coordinates.

Quality​Threshold


public attribute QualityThreshold → (get)

value : float64

The average quality threshold.

The average quality threshold of this mesh chunk.

Sector


public attribute Sector → (get)

value : int32

The mesh vertex that represents this mesh chunk.

Returns the mesh vertex that represents the root sector of the mesh chunk.

Since a mesh chunk is a complete CLOD mesh, it also contains a minimal outer mesh that surrounds the actual mesh chunk area.

Textures


public attribute Textures → (get)

value : IMapConst<string, TexelBuffer>

[not-null]
Mapping from layer name to layer texture.

The layer textures of this mesh chunk.

Tile


public attribute Tile → (get)

value : PyramidCoords

The pyramid tile coordinates.

The pyramid tile coordinates of this mesh chunk.

Vertex​Count


public attribute VertexCount → (get)

value : int32

[⇐ICapacity.Capacity]
the number of mesh vertices.

The number of mesh vertices.