* Reset branch for WPF changes * Convert BMP to PNG; fix link-out-of-scope err * Add snippets for WPF... 6794 files!!!! * Add missing snippets * update file updated between migration * Fix paths to include * update breadcrumb and toc * fix index links * fix index links * fix index links * fix markdown
2.0 KiB
title, ms.date, helpviewer_keywords, ms.assetid
| title | ms.date | helpviewer_keywords | ms.assetid | |||
|---|---|---|---|---|---|---|
| How to: Animate a 3D Rotation Using Quaternions | 03/30/2017 |
|
adca9cb1-066b-4de8-abbb-6b4007579ee7 |
How to: Animate a 3D Rotation Using Quaternions
This example shows how to animate a rotation of a 3D object using quaternions.
The code below shows a xref:System.Windows.Media.Media3D.QuaternionRotation3D used as the value for the xref:System.Windows.Media.Media3D.RotateTransform3D.Rotation%2A property of a xref:System.Windows.Media.Media3D.RotateTransform3D.
[!code-xamlAnimation3DGallery_snip#QuaternionAnimationExampleInline1]
This xref:System.Windows.Media.Media3D.QuaternionRotation3D is animated with a xref:System.Windows.Media.Animation.QuaternionAnimation within a xref:System.Windows.Media.Animation.Storyboard using the code below.
[!code-xamlAnimation3DGallery_snip#QuaternionAnimationExampleInline2]
Example
The following code shows the entire sample.
[!code-xamlAnimation3DGallery_snip#QuaternionAnimationExampleWholePage]