Class InputLayouts
This class represent contains the descriptions of vertex input layout.
Namespace: Evergine.Common.Graphics
Assembly: Evergine.Common.dll
Syntax
public class InputLayouts
Constructors
InputLayouts()
Initializes a new instance of the InputLayouts class.
Declaration
public InputLayouts()
Fields
LayoutElements
The vertex inputs elements.
Declaration
public List<LayoutDescription> LayoutElements
Field Value
| Type | Description |
|---|---|
| List<LayoutDescription> |
Methods
Add(LayoutDescription)
Adds a new layout.
Declaration
public InputLayouts Add(LayoutDescription layout)
Parameters
| Type | Name | Description |
|---|---|---|
| LayoutDescription | layout | Layout description. |
Returns
| Type | Description |
|---|---|
| InputLayouts | My own instance. |
Clean()
Clean object.
Declaration
public void Clean()
Equals(InputLayouts)
Returns a hash code for this instance.
Declaration
public bool Equals(InputLayouts other)
Parameters
| Type | Name | Description |
|---|---|---|
| InputLayouts | 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
FindLayoutElementByUsage(ElementSemanticType, int, out ElementDescription, out int)
Finds an layout element description. by its usage semantic.
Declaration
public bool FindLayoutElementByUsage(ElementSemanticType semantic, int semanticIndex, out ElementDescription elementDescription, out int vertexBufferIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| ElementSemanticType | semantic | The element semantic. |
| int | semanticIndex | The semantic index. |
| ElementDescription | elementDescription | The element description. |
| int | vertexBufferIndex | The vertex buffer index. |
Returns
| Type | Description |
|---|---|
| bool | True if the input layout contains an element with the specified semantic and index. False otherwise. |
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
IsAssignable(InputLayouts)
If the current layout is assignable to the parameter input layout.
Declaration
public bool IsAssignable(InputLayouts inputLayouts)
Parameters
| Type | Name | Description |
|---|---|---|
| InputLayouts | inputLayouts | The input layouts. |
Returns
| Type | Description |
|---|---|
| bool | If the specified layout is compatible. |
Read(BinaryReader)
Read InputLayouts from binary file.
Declaration
public static InputLayouts Read(BinaryReader reader)
Parameters
| Type | Name | Description |
|---|---|---|
| BinaryReader | reader | The binary reader. |
Returns
| Type | Description |
|---|---|
| InputLayouts | The readed inputLayouts. |
TryGetSlot(ElementSemanticType, uint, out int)
Try get the attribute slot by semantic and semantic index.
Declaration
public bool TryGetSlot(ElementSemanticType semantic, uint semanticIndex, out int slot)
Parameters
| Type | Name | Description |
|---|---|---|
| ElementSemanticType | semantic | Attribute semantic type. |
| uint | semanticIndex | Attribute semantic index. |
| int | slot | Attribute slot. |
Returns
| Type | Description |
|---|---|
| bool | True whether found the attribute and False in otherwise. |
Write(BinaryWriter)
Write InputLayouts in a binary file.
Declaration
public void Write(BinaryWriter writer)
Parameters
| Type | Name | Description |
|---|---|---|
| BinaryWriter | writer | The binary writer. |
Operators
operator ==(InputLayouts, InputLayouts)
Implements the operator ==.
Declaration
public static bool operator ==(InputLayouts value1, InputLayouts value2)
Parameters
| Type | Name | Description |
|---|---|---|
| InputLayouts | value1 | The value1. |
| InputLayouts | value2 | The value2. |
Returns
| Type | Description |
|---|---|
| bool | The result of the operator. |
operator !=(InputLayouts, InputLayouts)
Implements the operator ==.
Declaration
public static bool operator !=(InputLayouts value1, InputLayouts value2)
Parameters
| Type | Name | Description |
|---|---|---|
| InputLayouts | value1 | The value1. |
| InputLayouts | value2 | The value2. |
Returns
| Type | Description |
|---|---|
| bool | The result of the operator. |