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

class VertexElements in Tinman.Terrain.Rendering

An immutable list of vertex elements.

[ShutdownSurvive]
sealed class VertexElements implements IEquatable<VertexElements>

Public / Attributes

Alignment

Returns the byte alignment of this vertex element declaration.

public property Alignment { get }
type int32
value [>0] The byte alignment.

Remarks:

The default value is 1, i.e. no alignment.

Count

The number of vertex format elements.

public property Count { get }
type int32
value [>=0] The element count.

SizeAligned

Returns the aligned size of this vertex element declaration.

public property SizeAligned { get }
type int32
value [>=0] The aligned vertex size, in bytes. Will always be a multiple of four.

See also:

Alignment

SizeCompact

Returns the compact size of this vertex element declaration, without byte alignment.

public property SizeCompact { get }
type int32
value [>=0] The compact vertex size, in bytes. Will always be a multiple of four.

See also:

VertexElement.Size

Public / Constants

Empty

An empty list of vertex elements.

public static readonly field Empty
type VertexElements

Public / Constructors

VertexElements

Creates a new instance of VertexElements.

public constructor VertexElements (VertexElement element)
params element [not-null] The vertex element to wrap.

Creates a new instance of VertexElements.

public constructor VertexElements (VertexElementUsage usage, VertexElementType type, int32 count, VertexElementFlags flags = VertexElementFlags.None)
params usage Usage of first vertex format element.
  type Data type of first vertex format element.
  count [0..4] Number of data values in first vertex format element.
  flags Additional vertex element flags. Defaults to None.

Public / Methods

Add

Appends the given vertex element using SizeCompact as Offset and returns the resulting VertexElements object.

public method Add (VertexElement element)
type VertexElements
params element [not-null] The vertex format element to append.
returns [not-null] The resulting vertex elements.

Appends the given vertex elements using SizeCompact as respective Offset and returns the resulting VertexElements object.

public method Add (VertexElements elements)
type VertexElements
params elements [not-null] The vertex format elements to append.
returns [not-null] The resulting vertex elements.

Appends the given vertex element using SizeCompact as Offset and returns the resulting VertexElements object.

public method Add (VertexElementUsage usage, VertexElementType type, int32 count, VertexElementFlags flags = VertexElementFlags.None)
type VertexElements
params usage Usage of vertex format element.
  type Data type of vertex format element.
  count [0..4] Number of data values in vertex format element.
  flags Additional vertex element flags. Defaults to None.
returns [not-null] The resulting vertex elements.

Align

Adjusts this vertex format element list so that SizeAligned becomes a multiple of alignment*4.

public method Align (int32 alignment = 4)
type VertexElements
params alignment [>0] The alignment of the vertex format size, in 32-bit words. Defaults to 4, i.e. 16 bytes.
returns [not-null] The resulting vertex format element list.

Equals

Compares this object with the given one.

[Pure]
public method Equals (VertexElements other)
type bool
params other The object to compare to.
returns true if this object is equal to other, false if not.

Get

Returns the index-th vertex format element.

public method Get (int32 index)
type VertexElement
params index [0..Count-1] Index of vertex format element.
returns [not-null] The vertex format element.

Remarks:

The vertex format elements are sorted by their byte offset (see Offset) in ascending order.

GetHashCode

[Pure]
public override method GetHashCode ()
type int32

ToString

[Pure]
public override method ToString ()
type string

Writer

Returns an independent IVertexElementWriter object for the index-th vertex element.

public method Writer (int32 index)
type IVertexElementWriter
params index [0..Count-1] Index of vertex format element.
returns [not-null] The IVertexElementWriter object.

Remarks:

Calling this method multiple times will return the same IVertexElementWriter object per index.