MeshBuilder.AddTriangleVertex Method
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)
Syntax
public void AddTriangleVertex (
int indexIntoVertexCollection
)
Parameters
- indexIntoVertexCollection
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.
See Also
Reference
MeshBuilder Class
MeshBuilder Members
Microsoft.Xna.Framework.Content.Pipeline.Graphics Namespace
Platforms
Windows XP SP2, Windows Vista