sealed class Tinman.Terrain.Meshing.TerrainBounds

The TerrainBounds class traverses the filtered mesh (see IMeshFilters.FilterIn) and outputs a bounding box in terrain-space for each mesh sector (see BoundsSectors), optionally clipped to the bounding box of the terrain and the view frustum.

The following vertex data semantics are used by this class:

Public / Constructors


public constructor TerrainBounds → ()

Creates a new instance of TerrainBounds.

Public / Methods


public method Compute → (1)

bounds opt : TerrainBoundsDelegate = null

Callback to use for collecting additional bounding boxes for the terrain bounds. Defaults to null.

Computes the terrain bounds for the current mesh.

If not bound to a mesh, only the given additional bounds opt are used to compute the terrain bounds.

Public / Attributes


public attribute BoundsSectors → (get,set)

value : BoxSoup

The box soup that receives the mesh sector bounds.

The collected terrain mesh sector bounds.


public attribute FilterIn → (get,set)

value : MeshTreeFilter

The filter or null.

The mesh tree input filter to use for querying sector culling and marks.

The default value is null (i.e. all mesh sectors are visited).


public attribute Frustum → (get,set)

value : IFrustum

The view frustum.

Optional view frustum to use.


public attribute Offset → (get,set)

value : float32

The vertical offset, in screen-pixels.

Vertical offset to apply to generated terrain bounding boxes.

Defaults to 16.