VertexElement

Description

[ShutdownSurvive]
sealed class Tinman.Terrain.Rendering.VertexElement

Describes a single element of a vertex format.

Public / Constants

DefaultColor


public static readonly attribute DefaultColor → (VertexElement)

Default VertexElement value:

DefaultNormal


public static readonly attribute DefaultNormal → (VertexElement)

Default VertexElement value:

DefaultPosition


public static readonly attribute DefaultPosition → (VertexElement)

Default VertexElement value:

DefaultTangent


public static readonly attribute DefaultTangent → (VertexElement)

Default VertexElement value:

DefaultTextureCoords


public static readonly attribute DefaultTextureCoords → (VertexElement)

Default VertexElement value:

Public / Constructors

VertexElement


public constructor VertexElement → (5)

usage in : VertexElementUsage

The usage semantics of the vertex format element.

type in : VertexElementType

The data type of the vertex format element. Set to VertexElementType.Placeholder to create an empty placeholder for usage in.

count in : int32

[0..4]
The number of values in this vertex format element. Set to 0 to create an empty placeholder for usage in.

flags in : VertexElementFlags

Shall values be normalized before they arrive at the GPU for processing?

offset opt : int32 = 0

[>=0]
The offset to the first byte of this element in the vertex.

Creates a new instance of VertexElement.

Public / Methods

ToString

2 overloads


[Pure]
public static method ToString1 → (1)

type in : VertexElementType

The vertex element type.

returns → string

The human-readable string.

Returns a human-readable string for the given vertex element type.


[Pure]
public static method ToString2 → (1)

flags in : VertexElementFlags

The vertex element flags

returns → string

The human-readable string.

Returns a human-readable string for the given vertex element flags.

UsageId


[Pure]
public method UsageId → (1)

usageCounter in : int32

The usage counter that keeps track of all preceding vertex elements, see VertexElements.UsageCounter.

returns → int32

The usage ID of this vertex element.

Returns the usage ID of this vertex element.

Writer


public method Writer → ()

returns → IVertexElementWriter

The vertex element writer.

Creates a IVertexElementWriter object that may be used to write vertex data for this vertex element.

Public / Attributes

Count


public readonly attribute Count → (int32)

The number of values in this vertex format element.

Flags


public readonly attribute Flags → (VertexElementFlags)

Additional vertex element flags.

IsFloatType


public attribute IsFloatType → (get)

value : bool

true if Type is floating-point, false if not.

Is the vertex element type floating-point?

IsIntegerType


public attribute IsIntegerType → (get)

value : bool

true if Type is integer-based, false if not.

Is the vertex element type integer-based?

IsSignedType


public attribute IsSignedType → (get)

value : bool

true if Type allows negative values, false if not.

Does the vertex element type allow negative values?

Offset


public readonly attribute Offset → (int32)

The offset to the first byte of this element in the vertex format.

Size


public attribute Size → (get)

value : int32

[>=0]
The size in bytes (always a multiple of four) or 0 iff this is a placeholder for Usage.

Size of this element in the vertex format, in bytes.

Type


public readonly attribute Type → (VertexElementType)

The data type of this vertex format element or VertexElementType.Placeholder if this is a placeholder for Usage.

Usage


public readonly attribute Usage → (VertexElementUsage)

The usage semantics of this vertex format element.