共用方式為


AxisAngleRotation3D.Axis 屬性

定義

取得或設定立體旋轉軸。

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

屬性值

Vector3D

指定旋轉軸的 Vector3D

範例

下列程式碼摘錄會將 AxisAngleRotation3D 套用至 GeometryModel3D

<ModelVisual3D>
  <ModelVisual3D.Content>
    <GeometryModel3D Geometry="{StaticResource myTeapot}">
      <GeometryModel3D.Material>
        <DiffuseMaterial>
          <DiffuseMaterial.Brush>
            <SolidColorBrush Color="Blue" Opacity="1.0" />
          </DiffuseMaterial.Brush>
        </DiffuseMaterial>
      </GeometryModel3D.Material>
      <GeometryModel3D.Transform>
        <RotateTransform3D>
          <RotateTransform3D.Rotation>
            <AxisAngleRotation3D x:Name="myAngleRotation" Axis="0,3,0" Angle="1" />
          </RotateTransform3D.Rotation>
        </RotateTransform3D>
      </GeometryModel3D.Transform>
    </GeometryModel3D>
  </ModelVisual3D.Content>
</ModelVisual3D>

備註

相依性屬性資訊

識別碼欄位 AxisProperty
中繼資料屬性設定為 true

適用於