MeshSample

Description

sealed class Tinman.Terrain.Kernel.MeshSample

Data container for a CLOD mesh sample, before being used to create a new mesh vertex.

Public / Methods

Modify​Coverage


public method ModifyCoverage → (1)

coverage in : float64

The coverage to multiply with. Will be clamped to [0..1].

Updates Coverage by multiplying it with coverage in.

Modify​Elevation


public method ModifyElevation → (1)

elevation in : float64

The new elevation value.

Sets the Elevation value and updates Position according to Up.

Modify​Position


public method ModifyPosition → (1)

position in : Vec3D

The new position value.

Sets the Position value and updates Elevation according to Up.

Position​At


[Pure]
public method PositionAt → (1)

elevation in : float64

The elevation value.

returns → Vec3D

The position at elevation in.

Returns the position at the given elevation.

Set


public method Set → (2)

coords in : Vec3I

The heightmap coordinates.

sample in : HeightmapSample

The heightmap sample.

Sets all attributes of this mesh sample and computes Position and Up.

Public / Attributes

Coverage


public attribute Coverage → (float64)

The relative coverage (see HeightmapLayer.Coverage) between 0 and 1.

When the coverage is modified, Displacement, Elevation, Material and Texture must be modified accordingly.

Displacement


public attribute Displacement → (float64)

The terrain-space vertex displacement (see HeightmapLayer.Displacement).

See also

VerticalRange

Elevation


public attribute Elevation → (float64)

The terrain-space vertex elevation (see HeightmapLayer.Elevation).

When the elevation is modified, the Position must be modified accordingly. This may be done with ModifyElevation.

See also

VerticalRange

Material


public attribute Material → (int64)

The terrain material (see HeightmapLayer.Material).

See also

MaterialToken

Position


public attribute Position → (Vec3D)

The terrain-space position (see IGeometry), not including displacement.

When the position is modified, the Elevation must be modified accordingly. This may be done with ModifyPosition.

Texture


public attribute Texture → (int64)

The terrain texture (see HeightmapLayer.Texture).

See also

Colors

Up


public attribute Up → (Vec3D)

The unit-length terrain-space up-vector (see IGeometry).