Struct ElementDescription
Describes an individual component of a vertex.
Implements
Inherited Members
Namespace: Evergine.Common.Graphics
Assembly: Evergine.Common.dll
Syntax
public struct ElementDescription : IEquatable<ElementDescription>
Constructors
ElementDescription(ElementFormat, ElementSemanticType, uint, int)
Initializes a new instance of the ElementDescription struct.
Declaration
public ElementDescription(ElementFormat format, ElementSemanticType semanticType, uint semanticIndex = 0, int offset = -1)
Parameters
Type | Name | Description |
---|---|---|
ElementFormat | format | The element format, ElementFormat. |
ElementSemanticType | semanticType | The element semantic, ElementSemanticType. |
uint | semanticIndex | The semantic index for this element. |
int | offset | The element offset. |
Fields
AppendAligned
Use secuential offset.
Declaration
public const int AppendAligned = -1
Field Value
Type | Description |
---|---|
int |
Format
Gets the format of the element.
Declaration
public ElementFormat Format
Field Value
Type | Description |
---|---|
ElementFormat |
Offset
Gets the offset of the element.
Declaration
public int Offset
Field Value
Type | Description |
---|---|
int |
Semantic
Gets the type of the element.
Declaration
public ElementSemanticType Semantic
Field Value
Type | Description |
---|---|
ElementSemanticType |
SemanticIndex
Gets the semantic index of this element.
Declaration
public uint SemanticIndex
Field Value
Type | Description |
---|---|
uint |
Methods
Equals(ElementDescription)
Returns a hash code for this instance.
Declaration
public bool Equals(ElementDescription other)
Parameters
Type | Name | Description |
---|---|---|
ElementDescription | other | Other used to compare. |
Returns
Type | Description |
---|---|
bool | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Equals(object)
Determines whether the specified object is equal to this instance.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with this instance. |
Returns
Type | Description |
---|---|
bool |
|
Overrides
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Overrides
Read(BinaryReader)
Read ElementDescription from binary file.
Declaration
public static ElementDescription Read(BinaryReader reader)
Parameters
Type | Name | Description |
---|---|---|
BinaryReader | reader | The binary reader. |
Returns
Type | Description |
---|---|
ElementDescription | The readed ElementDescription. |
Write(BinaryWriter)
Write ElementDescription into binary file.
Declaration
public void Write(BinaryWriter writer)
Parameters
Type | Name | Description |
---|---|---|
BinaryWriter | writer | The binary writer. |
Operators
operator ==(ElementDescription, ElementDescription)
Implements the operator ==.
Declaration
public static bool operator ==(ElementDescription value1, ElementDescription value2)
Parameters
Type | Name | Description |
---|---|---|
ElementDescription | value1 | The value1. |
ElementDescription | value2 | The value2. |
Returns
Type | Description |
---|---|
bool | The result of the operator. |
operator !=(ElementDescription, ElementDescription)
Implements the operator ==.
Declaration
public static bool operator !=(ElementDescription value1, ElementDescription value2)
Parameters
Type | Name | Description |
---|---|---|
ElementDescription | value1 | The value1. |
ElementDescription | value2 | The value2. |
Returns
Type | Description |
---|---|
bool | The result of the operator. |