MeshBuilder.AddTriangleVertex Method

Note

This method is available only when developing for Windows.

Adds a vertex into the index collection.

Syntax

'Declaration
Public Sub AddTriangleVertex ( _
         indexIntoVertexCollection As Integer _
)
public void AddTriangleVertex (
         int indexIntoVertexCollection
)
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.

Remarks

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.

Requirements

Namespace: Microsoft.Xna.Framework.Content.Pipeline.Graphics

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

See Also

Reference

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

Platforms

Windows 7, Windows Vista, Windows XP