Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
 TriangleIndices Property

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
MeshGeometry3D..::.TriangleIndices Property

Gets or sets a collection of triangle indices for the MeshGeometry3D. This is a dependency property.

Namespace:  System.Windows.Media.Media3D
Assembly:  PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/xaml/presentation
Visual Basic (Declaration)
Public Property TriangleIndices As Int32Collection
Visual Basic (Usage)
Dim instance As MeshGeometry3D
Dim value As Int32Collection

value = instance.TriangleIndices

instance.TriangleIndices = value
C#
public Int32Collection TriangleIndices { get; set; }
Visual C++
public:
property Int32Collection^ TriangleIndices {
    Int32Collection^ get ();
    void set (Int32Collection^ value);
}
JScript
public function get TriangleIndices () : Int32Collection
public function set TriangleIndices (value : Int32Collection)
XAML Property Element Usage
<object>
  <object.TriangleIndices>
    <Int32Collection .../>
  </object.TriangleIndices>
</object>
XAML Attribute Usage
<object TriangleIndices="Int32Collection" .../>

Property Value

Type: System.Windows.Media..::.Int32Collection
Collection that contains the triangle indices of the MeshGeometry3D.

Identifier field

TriangleIndicesProperty

Metadata properties set to true

None

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.

<GeometryModel3D>
  <GeometryModel3D.Geometry>
          <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" />
      </GeometryModel3D.Geometry>
      <GeometryModel3D.Material>
          <DiffuseMaterial>
              <DiffuseMaterial.Brush>
                  <SolidColorBrush Color="Cyan" Opacity="0.3"/>
              </DiffuseMaterial.Brush>
          </DiffuseMaterial>
      </GeometryModel3D.Material>
  <!-- Translate the plane. -->
      <GeometryModel3D.Transform>
          <TranslateTransform3D
            OffsetX="2" OffsetY="0" OffsetZ="-1"   >
          </TranslateTransform3D>
      </GeometryModel3D.Transform>
  </GeometryModel3D>

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker