Share via

MeshGeometry3D.TriangleIndices Property


Gets or sets a collection of triangle indices for the MeshGeometry3D.

 property System::Windows::Media::Int32Collection ^ TriangleIndices { System::Windows::Media::Int32Collection ^ get(); void set(System::Windows::Media::Int32Collection ^ value); };
public System.Windows.Media.Int32Collection TriangleIndices { get; set; }
member this.TriangleIndices : System.Windows.Media.Int32Collection with get, set
Public Property TriangleIndices As Int32Collection

Property Value

Collection that contains the triangle indices of the MeshGeometry3D.


              Positions="-1 -1 0  1 -1 0  -1 1 0  1 1 0"
              Normals="0 0 1  0 0 1  0 0 1  0 0 1"
              TextureCoordinates="0 1  1 1  0 0  1 0   "
              TriangleIndices="0 1 2  1 3 2" />
                  <SolidColorBrush Color="Cyan" Opacity="0.3"/>
  <!-- Translate the plane. -->
            OffsetX="2" OffsetY="0" OffsetZ="-1"   >


For a triangle in a given 3-D mesh, the order in which the triangle's vertex positions are specified determines whether the triangle face is a front or back face.

The Windows Presentation Foundation 3-D implementation uses a counter-clockwise winding order; that is, the points that determine a front-facing mesh triangle's positions should be specified in counterclockwise order, as viewed from the front of the mesh.

Setting the TriangleIndices property is optional. If the indices are not specified, triangles are drawn in a non-indexed fashion. Every set of three positions becomes a triangle.

Dependency Property Information

Identifier field TriangleIndicesProperty
Metadata properties set to true None

Applies to