Redigera

Dela via


MeshGeometry3D.Positions Property

Definition

Gets or sets a collection of vertex positions for a MeshGeometry3D.

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

Property Value

Point3DCollection that contains the vertex positions of the MeshGeometry3D.

Examples

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

Remarks

The points specified by this property represent the vertices of the triangles that make up a 3-D mesh.

The winding order (the order in which the Positions that make up each triangle of the mesh are specified) determines whether a given face is front-facing or back-facing. Front-facing triangles are wound in counter-clockwise order; back-facing triangles are wound in clockwise order.

Dependency Property Information

Identifier field PositionsProperty
Metadata properties set to true None

Applies to