Class VertexDeclaration

VertexDeclaration class

The declaration of a custom defined vertex’s structure

public sealed class VertexDeclaration : IComparable<VertexDeclaration>, IEnumerable<VertexField>

Constructors

NameDescription
VertexDeclaration()The default constructor.

Properties

NameDescription
Count { get; }Gets the count of all fields defined in this VertexDeclaration
Item { get; }
Sealed { get; }A VertexDeclaration will be sealed when its been used by TriMesh or TriMesh, no more modifications is allowed.
Size { get; }The size in byte of the vertex structure.

Methods

NameDescription
static FromGeometry(Geometry, bool)Create a VertexDeclaration based on a Geometry’s layout.
static FromType<T>()
AddField(VertexFieldDataType, VertexFieldSemantic, int, string)Add a new vertex field
Clear()Clear all fields.
CompareTo(VertexDeclaration)Compares this instance to a specified object and returns an indication of their relative values.
override Equals(object)Determines whether this instance and a specified object, which must also be a VertexDeclaration object, have the same value.
GetEnumerator()Gets an enumerator to walk through all vertex fields in this instance.
override GetHashCode()Returns the hash code for this string.
override ToString()String representation of VertexDeclaration

See Also