ImageDecal

Description

sealed class Tinman.Engine.Scenes.Entities.ImageDecal

A scene entity that puts a geo-referenced image as a decal onto the terrain.

The default value for the ILightingProperty.Lighting property is false.

See also

TerrainDecal

Public / Constructors

Image​Decal


public constructor ImageDecal → (1)

entityViewMask opt : int64 = ~0

The value for IEntityViewMask.EntityViewMask.

Creates a new instance of ImageDecal.

Public / Attributes

Color


public attribute Color → (get,set)

value : int64

The modulation color.

The color to use for modulating the decal texture.

Defaults to Colors.White.

Content


public attribute Content → (get,set)

value : IImage

The image content.

The geo-referenced image content of the terrain decal.

If the image dimensions are greater than the maximum texture size, the decal will use a downscaled texture on the GPU, unless content tiling has been enabled via Tiling.

Format


public attribute Format → (get,set)

value : PixelFormat

The pixel format.

The pixel format to use when choosing the underlying texture format.

For rendering, the image decal must be present on the GPU as a texture. The texture format (see TextureFormat) is chosen automatically, based on the pixel format of the image data (TextureFormat.For).

When this property is set to PixelFormat.Unknown, the pixel format of the given content image will be used (see IImageInfo.PixelFormat). Otherwise, the specified pixel format is used.

Defaults to PixelFormat.Unknown.

Sort​Index


public attribute SortIndex → (get,set)

value : int32

The sort index, see TerrainDecal.SortIndex.

The terrain layer sort index of this texture decal.

Tiling


public attribute Tiling → (get,set)

value : int32

[>=0]
The tiling size, in pixels. Set to 0 to disable tiling.

Specifies the tiling size to apply to the image content.

When tiling is disabled, a single GPU texture is used for the whole image decal (see ITexture2D), which limits the maximum decal resolution to the supported texture size (see ITextureFactory.ValidateTextureSize), because the image content will be scaled down to the texture size, if necessary.

When tiling is enabled, two or more GPU textures are used for the image decal, each having a width / height that is a less than or equal to the tiling size.

To find out the maximum texture size, the ITextureFactory.ValidateTextureSize method may be used. Use these properties to obtain the ITextureFactory object: ISceneView3D.Terrain, TerrainView.Stage, IRenderStage.Context, IGraphicsContext.TextureFactory

Defaults to 0, which disables tiling.

Logging

Logger


public static readonly attribute Logger → (ILogger)

The logger object of this class.