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

class VertexElement in Tinman.Terrain.Rendering

Describes a single element of a vertex format.

[ShutdownSurvive]
sealed class VertexElement implements IComparable<VertexElement>
  IEquatable<VertexElement>

See also:

IBufferFactory.ValidateVertexElement

Public / Attributes

Count

The number of values in this vertex format element.

public readonly field Count
type int32

Flags

Additional vertex element flags.

public readonly field Flags
type VertexElementFlags

IsFloatType

Is the vertex element type floating-point?

public property IsFloatType { get }
type bool
value true if Type is floating-point, false if not.

IsIntegerType

Is the vertex element type integer-based?

public property IsIntegerType { get }
type bool
value true if Type is integer-based, false if not.

IsSignedType

Does the vertex element type allow negative values?

public property IsSignedType { get }
type bool
value true if Type allows negative values, false if not.

Offset

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

public readonly field Offset
type int32

Size

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

public property Size { get }
type int32
value [>=0] The size in bytes (always a multiple of four) or 0 iff this is a placeholder for Usage.

Type

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

public readonly field Type
type VertexElementType

Usage

The usage semantics of this vertex format element.

public readonly field Usage
type VertexElementUsage

Public / Constants

DefaultColor

Default VertexElement value:

public static readonly field DefaultColor
type VertexElement

DefaultNormal

Default VertexElement value:

public static readonly field DefaultNormal
type VertexElement

DefaultPosition

Default VertexElement value:

public static readonly field DefaultPosition
type VertexElement

DefaultTangent

Default VertexElement value:

public static readonly field DefaultTangent
type VertexElement

DefaultTextureCoords

Default VertexElement value:

public static readonly field DefaultTextureCoords
type VertexElement

Public / Constructors

VertexElement

Creates a new instance of VertexElement.

public constructor VertexElement (VertexElementUsage usage, VertexElementType type, int32 count, VertexElementFlags flags, int32 offset = 0)
params usage The usage semantics of the vertex format element.
  type The data type of the vertex format element. Set to Placeholder to create an empty placeholder for usage.
  count [0..4] The number of values in this vertex format element. Set to 0 to create an empty placeholder for usage.
  flags Shall values be normalized before they arrive at the GPU for processing?
  offset [>=0] The offset to the first byte of this element in the vertex. Defaults to 0.

Public / Methods

CompareTo

Compares this object with the given one.

[Pure]
public method CompareTo (VertexElement other)
type int32
params other The object to compare to.
returns < 0 : if this object is less than other,
= 0 : if this object is equal to other,
> 0 : if this object is greater than other.

Equals

Compares this object with the given one.

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

Compares this object with the given one.

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

GetHashCode

[Pure]
public override method GetHashCode ()
type int32

ToString

[Pure]
public override method ToString ()
type string

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

[Pure]
public static method ToString (VertexElementType type)
type string
params type The vertex element type.
returns [not-empty] The human-readable string.

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

[Pure]
public static method ToString (VertexElementFlags flags)
type string
params flags The vertex element flags
returns [not-empty] The human-readable string.

Writer

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

public method Writer ()
type IVertexElementWriter
returns [not-null] The vertex element writer.