TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class Decal in Tinman.Terrain.Meshing

Defines a terrain mesh decal.

sealed class Decal  

Public / Attributes

IsUndefined

Is the decal currently undefined?

public property IsUndefined { get }
type bool
value true if the decal is undefined, false if all required vertices are valid.

UserData

Optional user object of this decal.

public property UserData { get set }
type object
value The user object or null.

Public / Constructors

Decal

Creates a new instance of Decal.

public constructor Decal ()

Public / Methods

Clone

Creates a clone of this decal.

public method Clone ()
type Decal
returns [not-null] The cloned decal.

Contains

[Pure]
public method Contains (Vec3D heightmap)
type bool
params heightmap

Coordinates

Returns the local decal coordinates of the given decal vertex.

[Pure]
public method Coordinates (DecalVertex vertex)
type Vec2D
params vertex The decal vertex.
returns The local decal coordinates of vertex.

Sets the local decal coordinates for the given decal vertex.

public method Coordinates (DecalVertex vertex, Vec2D coords)
params vertex The decal vertex.
  coords The local decal coordinates.

CoordinatesDefault

Resets the local decal coordinates to their default values.

[Pure]
public method CoordinatesDefault ()

Heightmap

Returns the heightmap coordinates of the given decal vertex.

[Pure]
public method Heightmap (DecalVertex vertex)
type Vec3D
params vertex The decal vertex.
returns The heightmap coordinates of vertex, relative to MaxSize.

Sets the heightmap coordinates for the given decal vertex.

public method Heightmap (DecalVertex vertex, Vec3D coords)
params vertex The decal vertex.
  coords The heightmap coordinates, relative to MaxSize.

HeightmapClear

Clears the heightmap coordinates of all decal vertices to Undefined.

public method HeightmapClear ()

HeightmapTrace

Traces the edges of this decal and generated additional decal vertices, if necessary.

public method HeightmapTrace (ICanvasTransform transform, Vec2D mapA, Vec2D mapB, Vec2D mapC, Vec2D mapD)
params transform [not-null] The transformation to use for tracing.
  mapA Map coordinates of A.
  mapB Map coordinates of B.
  mapC Map coordinates of C.
  mapD Map coordinates of D.

Remarks:

Additional decal vertices are only necessary when a decal stretches over two or more cubemap faces.