C# Class Axiom.Graphics.VertexElement

This class declares the usage of a single vertex buffer as a component of a complete VertexDeclaration.
Inheritance: ICloneable
Mostra file Open project: WolfgangSt/axiom Class Usage Examples

Protected Properties

Property Type Description
index int
offset int
semantic VertexElementSemantic
source short
type VertexElementType

Public Methods

Method Description
Clone ( ) : object

Simple memberwise clone since all local fields are value types.

ConvertColorValue ( ColorEx color, VertexElementType colorVertexElementType ) : int
GetTypeCount ( VertexElementType type ) : int

Utility method which returns the count of values in a given type.

GetTypeSize ( VertexElementType type ) : int

Utility method for helping to calculate offsets.

MultiplyTypeCount ( VertexElementType type, int count ) : VertexElementType

Returns proper enum for a base type multiplied by a value. This is helpful when working with tex coords especially since you might not know the number of texture dimensions at runtime, and when creating the VertexBuffer you will have to get a VertexElementType based on that amount to creating the VertexElement.

VertexElement ( short source, int offset, VertexElementType type, VertexElementSemantic semantic ) : System

Constructor.

VertexElement ( short source, int offset, VertexElementType type, VertexElementSemantic semantic, int index ) : System

Constructor.

Method Details

Clone() public method

Simple memberwise clone since all local fields are value types.
public Clone ( ) : object
return object

ConvertColorValue() public static method

public static ConvertColorValue ( ColorEx color, VertexElementType colorVertexElementType ) : int
color ColorEx
colorVertexElementType VertexElementType
return int

GetTypeCount() public static method

Utility method which returns the count of values in a given type.
public static GetTypeCount ( VertexElementType type ) : int
type VertexElementType
return int

GetTypeSize() public static method

Utility method for helping to calculate offsets.
public static GetTypeSize ( VertexElementType type ) : int
type VertexElementType
return int

MultiplyTypeCount() public static method

Returns proper enum for a base type multiplied by a value. This is helpful when working with tex coords especially since you might not know the number of texture dimensions at runtime, and when creating the VertexBuffer you will have to get a VertexElementType based on that amount to creating the VertexElement.
public static MultiplyTypeCount ( VertexElementType type, int count ) : VertexElementType
type VertexElementType Data type.
count int Multiplier.
return VertexElementType

VertexElement() public method

Constructor.
public VertexElement ( short source, int offset, VertexElementType type, VertexElementSemantic semantic ) : System
source short The source vertex buffer, as bound to an index using .
offset int The offset in the buffer that this element starts at.
type VertexElementType The type of element.
semantic VertexElementSemantic The meaning of the element.
return System

VertexElement() public method

Constructor.
public VertexElement ( short source, int offset, VertexElementType type, VertexElementSemantic semantic, int index ) : System
source short The source vertex buffer, as bound to an index using .
offset int The offset in the buffer that this element starts at.
type VertexElementType The type of element.
semantic VertexElementSemantic The meaning of the element.
index int Index of the item, only applicable for some elements like texture coords.
return System

Property Details

index protected_oe property

Index of the item, only applicable for some elements like texture coords.
protected int index
return int

offset protected_oe property

The offset in the buffer that this element starts at.
protected int offset
return int

semantic protected_oe property

The meaning of the element.
protected VertexElementSemantic semantic
return VertexElementSemantic

source protected_oe property

The source vertex buffer, as bound to an index using VertexBufferBinding.
protected short source
return short

type protected_oe property

The type of element.
protected VertexElementType type
return VertexElementType