sealed class Tinman.Terrain.Meshing.Decaling

The Decaling class traverses the filtered mesh (see IMeshFilters.FilterIn), generates zero or more DecalingBatch values for each mesh sector that intersects with a decal texture, and puts an explicit mark on it (see MeshTree.SectorMark), if it has at least one batch.

Use DecalAdd, DecalRemove and DecalRemoveAll to manage the list of IDecal objects that are processed by the Decaling object. During processing of each IDecal object, zero or more DecalingBatch values are produced.

The following vertex data semantics are used by this class:

Public / Constructors


public constructor Decaling → ()

Creates a new instance of Decaling.

Public / Methods


public method DecalAdd → (1)

decal in : IDecal

The decal texture.

Adds the given decal texture.

The given decal in will be added to the end of the decal texture list. To define the order in which decal textures are processed, the calling code should not rely on the list ordering, but should make use of IDecal.Priority instead.


public method DecalDirty → (1)

decal in : IDecal

The decal texture.

Marks the given decal texture as dirty, to force re-computation.

The Decaling class detects changes automatically by querying the following members:

This method should only be called if a change has occurred that cannot be detected by comparing the above values, for example modifying the parameters of a CoordinateOperation in a custom CoordinateSystem.


public method DecalRemove → (1)

decal in : IDecal

The decal texture.

Removes the given decal texture.


public method DecalRemoveAll → ()

Removes all decal textures.

Public / Attributes


public attribute Decals → (get)

value : IVectorConst<IDecal>

The decal textures, in the order as they have been added via DecalAdd, not sorted by IDecal.Priority.

Returns the list of decal textures.

Use the DecalFace.Decal field of DecalingBatch.Mapping as index into this list in order to find the IDecal object for a given DecalingBatch.


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).