MeshGeometry3D.TriangleIndices Property


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

Namespace:   System.Windows.Media.Media3D
Assembly:  PresentationCore (in PresentationCore.dll)

public Int32Collection TriangleIndices { get; set; }

Property Value

Type: System.Windows.Media.Int32Collection

Collection that contains the triangle indices of the MeshGeometry3D.

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.

Identifier field


Metadata properties set to true


              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"   >

.NET Framework
Available since 3.0
Return to top