Share via


MeshBuilder.CreatePosition Method

Inserts the specified vertex position into the vertex channel.

Overload List

Name Description
MeshBuilder.CreatePosition (Single, Single, Single) Inserts the specified vertex position into the vertex channel.
MeshBuilder.CreatePosition (Vector3) Inserts the specified vertex position into the vertex channel at the specified index.

Remarks

These vertices are shared between the mesh's geometry objects, preserving the topology information. For example, two different geometries could reference the same position, but have a different material, texture coordinates, and normals.

In most cases, the index returned by CreatePosition is based on the number of times this function has been called. For example, CreatePosition returns 0 on the first call, 1 on the second call, and so forth. Therefore, if you call CreatePosition for each vertex in your vertex collection, your vertex collection and the Positions collection of the finished MeshContent object are parallel, assuming MergeDuplicatePositions doesn't find anything to merge.

See Also

Reference

MeshBuilder Class
MeshBuilder Members
Microsoft.Xna.Framework.Content.Pipeline.Graphics Namespace