AxisAngleRotation3D.Axis Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the axis of a 3-D rotation.

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

Public Property Axis As Vector3D

Property Value

Type: System.Windows.Media.Media3D.Vector3D

Vector3D that specifies the axis of rotation.

Identifier field

AxisProperty

Metadata properties set to true

None

The following code excerpt applies an AxisAngleRotation3D to a 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>

.NET Framework
Available since 3.0
Return to top
Show: