Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

MeshBuilder.AddTriangleVertex Method

Bb194941.note(en-us,XNAGameStudio.41).gifNote
This method is available only when developing for Windows.
Adds a vertex into the index collection.

Namespace: Microsoft.Xna.Framework.Content.Pipeline.Graphics
Assembly: Microsoft.Xna.Framework.Content.Pipeline (in microsoft.xna.framework.content.pipeline.dll)

public void AddTriangleVertex (
         int indexIntoVertexCollection
)

Parameters

indexIntoVertexCollection
Type: Int32
Index of the inserted vertex, in the collection. This corresponds to the value returned by CreatePosition.

MeshBuilder supports triangle lists only. Therefore, calls to AddTriangleVertex must occur in groups of three. In addition, MeshBuilder automatically determines which GeometryContent object receives the current triangle based on the state data. This data is set by the last calls to SetMaterial and SetOpaqueData.

This means that per-vertex material and opaque data are not supported. Therefore, do not call SetMaterial or SetOpaqueData when defining a triangle. For an example of the proper method, see the MeshBuilder class overview.

Windows 7, Windows Vista, Windows XP

Community Additions

ADD
Show:
© 2015 Microsoft