CoverageBuffer

Description

sealed class Tinman.Terrain.Buffers.CoverageBuffer

Derived from

SampleBufferInt32 abstract

An implementation of the ISampleBuffer interface that stores 30-bit coverage values (see HeightmapSample.MaxValue30).

Public / Constants

ScanlineRangeDefault


public static readonly attribute ScanlineRangeDefault → (PixelRange)

The default value of ISampleBuffer.ScanlineRange.

For image coding, the raw pixel value corresponds to the coverage value (see HeightmapSample.Elevation).

The default pixel range maps the coverage values 0 and HeightmapSample.MaxValue30 to black resp. white.

Public / Constructors

Create


public static method Create → (2)

width in : int32

[>0]
Width of the coverage buffer.

height in : int32

[>0]
Height of the coverage buffer.

returns → CoverageBuffer

The created CoverageBuffer object.

Creates a new instance of CoverageBuffer.

Instances of CoverageBuffer can be pooled by calling IDeletable.Delete.

FromImage

3 overloads


public static method FromImage1 → (1)

image in : Path

[not-null]
The source image.

returns → CoverageBuffer

The created CoverageBuffer.

Creates a new instance of CoverageBuffer.

IOException

If an I/O error has occurred.

ValidatingException

If the image reader has reported an error, for example because of an unsupported file format feature.


public static method FromImage2 → (1)

image in : IImage

[not-null]
The source image.

returns → CoverageBuffer

The created CoverageBuffer.

Creates a new instance of CoverageBuffer.

IOException

If an I/O error has occurred.

ValidatingException

If the image reader has reported an error, for example because of an unsupported file format feature.


public static method FromImage3 → (1)

image in : IImageReader

[not-null]
The source image.

returns → CoverageBuffer

The created CoverageBuffer.

Creates a new instance of CoverageBuffer.

IOException

If an I/O error has occurred.

Public / Methods

Invert


public method Invert → ()

Inverts the coverage values in this buffer.