MeshGeometry3D::TextureCoordinates Property

 

Gets or sets a collection of texture coordinates for the MeshGeometry3D.

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

public:
property PointCollection^ TextureCoordinates {
	PointCollection^ get();
	void set(PointCollection^ value);
}

Property Value

Type: System.Windows.Media::PointCollection^

PointCollection that contains the texture coordinates for the MeshGeometry3D.

Texture coordinates determine how a Material is mapped to the vertices of the triangles that make up a mesh.

Note   If no texture coordinates are specified for a MeshGeometry3D, its Material might not render as expected.

Identifier field

TextureCoordinatesProperty

Metadata properties set to true

None

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

.NET Framework
Available since 3.0
Return to top
Show: