Files
docs-desktop/dotnet-desktop-guide/framework/wpf/graphics-multimedia/how-to-animate-a-3-d-rotation-using-quaternions.md
T
Andy De George da363692ff Initial WPF content migrated (#17)
* 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
2020-09-04 09:46:28 -07:00

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
quaternions [WPF]
animation [WPF], 3D translations [WPF], with quaternions
3D translations [WPF], animating [WPF], with quaternions
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]

See also