Tutorial_10_Tinman

Description

abstract class Tinman.Demo.Tutorials._1_LowLevel.Tutorial_10_Tinman

Derived from

Tutorial abstract

Extended by

Tutorial_11_Render

Full source code is included in the Tinman 3D SDK download.

Tinman 3D tutorial #10 : Tinman

This is the base class for tutorials that demonstrate how to use the Low-level Terrain API.

Protected / Methods

Create​Geometry


[EmptyBody]
protected virtual method CreateGeometry → ()

returns → IGeometry

The terrain geometry to use or null to create one automatically, based on the metadata in the terrain heightmap.

Creates the terrain geometry.

The geometry object is responsible for computing terrain-space positions and vectors, based on heightmap coordinates and elevation values.

Create​Gravity


[EmptyBody] [OwnerReturn]
protected virtual method CreateGravity → ()

returns → IHeightmap

The gravity-model or null if none.

Creates the gravity-model to use for terrain elevation values.

Create​Heightmap


[OwnerReturn]
protected virtual method CreateHeightmap → ()

returns → IHeightmap

The created heightmap.

Creates the terrain heightmap.

The heightmap provides the input terrain data that is used to generate the terrain mesh. It may also contain additional metadata, which is used to construct other objects like IGeometry and Geocentric automatically.

IOException

If an I/O error has occurred.

Create​Modifier


[EmptyBody]
protected virtual method CreateModifier → ()

returns → IMeshModifier

The mesh modifier or null for none.

Creates the terrain mesh modifier.

A mesh modifier can be used to alter the terrain mesh vertices, for example to perform procedural displacement.

Create​Structure​Updater


[EmptyBody] [OwnerReturn]
protected virtual method CreateStructureUpdater → ()

returns → IMeshStructureUpdater

The updater or null for none.

Creates the mesh structure updater.

Create​Vertex​Arrays


protected abstract method CreateVertexArrays → ()

returns → VertexArrays

The vertex data arrays.

Creates the vertex data arrays.

The vertex data arrays store per-vertex data that is used by the CPU to build the terrain mesh and for performing spatial queries (e.g. picking).

Create​Vertex​Updater


[EmptyBody] [OwnerReturn]
protected virtual method CreateVertexUpdater → ()

returns → IVertexUpdater

The updater or null for none.

Creates the vertex data updater.

Create​Visible​Check


protected abstract method CreateVisibleCheck → ()

returns → IVisibleCheck

The visibility check.

Creates the per-vertex visibility check that is used for continuous level-of-detail refinement of the terrain mesh.

Triangulate​Terrain


protected virtual method TriangulateTerrain → ()

Performs triangulation of the terrain.

When this method returns, the triangulationBuffer holds the result of the triangulation, possibly with an overflow (see TriangulationBuffer.HasOverflow).

The default implementation triangulates the whole terrain.

Protected / Attributes

geocentric


protected attribute geocentric → (Geocentric)

The geocentric coordinate computations helper object.

gravity


[Owner]
protected attribute gravity → (IHeightmap)

The gravity model of the terrain data or null.

mesh


[Owner]
protected attribute mesh → (IMeshDynamic)

The terrain mesh.

mesh​Buffer


[Owner]
protected attribute meshBuffer → (MeshBuffer)

The headless mesh buffer (no GPU resources).

triangulation​Buffer


protected attribute triangulationBuffer → (TriangulationBuffer)

The triangulation buffer.

Triangle batches for terrain mesh sectors can be extracted from the triangulation buffer, for example when exporting mesh data to 3rd party libraries.