VertexWriter
Description
Helper class for writing vertex data to a buffer in a specific format.
The following methods may be used to specify per-vertex data:
-
Vertex colors:
UseC(…)
methods to write.
Maps to VertexElementUsage.Color for ordinals [0..15]
Maps to Semantic.Texture for ordinal 0. -
Vertex normal vectors:
UseN(…)
methods to write.
Maps to VertexElementUsage.Normal for ordinals [0..15]
Maps to Semantic.Normal for ordinal 0. -
Vertex positions:
UseP(…)
methods to write.
Maps to VertexElementUsage.Position for ordinals [0..15]
Maps to Semantic.Position for ordinal 0. -
Vertex tangent vectors:
UseP(…)
methods to write.
Maps to VertexElementUsage.Tangent for ordinals [0..15]
Maps to Semantic.TangentX for ordinal 0.
Maps to Semantic.TangentY for ordinal 1. -
Vertex texture coordinates:
Maps to VertexElementUsage.TextureCoords for ordinals [0..15]
Maps to Semantic.TextureCoords for ordinal 0.
Maps to Semantic.TextureCoordsExtra for ordinal 1.
Public / Methods
C
4 overloads
Specifies a vertex color.
- See also
Specifies a vertex color.
- See also
Specifies a vertex color.
Specifies a vertex color.
G
3 overloads
Specifies a vertex tangent vector.
The given vector will be normalized if necessary.
Specifies a vertex tangent vector.
The given vector will be normalized if necessary.
Specifies a vertex tangent vector.
The given vector will be normalized if necessary.
N
3 overloads
Specifies a vertex normal vector.
The given vector will be normalized if necessary.
Specifies a vertex normal vector.
The given vector will be normalized if necessary.
Specifies a vertex normal vector.
The given vector will be normalized if necessary.
Ordinal
Returns the ordinal of the given vertex element usage (see VertexElementUsage) that will be specified next for the current vertex.
P
3 overloads
Specifies a vertex position.
Specifies a vertex position.
Specifies a vertex position.
T
10 overloads
Specifies a set of texture coordinates.
Specifies a set of texture coordinates.
Specifies a set of texture coordinates.
Specifies a set of texture coordinates.
Specifies a set of texture coordinates.
Specifies a set of texture coordinates.
Specifies a set of texture coordinates.
Specifies a set of texture coordinates.
Specifies a set of texture coordinates.
Specifies a set of texture coordinates.
ToArrays
Returns a vertex array collection that contains the vertex data that has been written so far.
ToBuffer
Returns a static vertex buffer of the given format that contains the vertex data that has been written so far.
- RenderException
-
If a graphics subsystem error has occurred.
Public / Attributes
Index
Index of current vertex.
The current vertex will receive the written data until Out is called.