Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 2.41 KB

how-to-apply-multiple-transformations-to-a-3-d-model.md

File metadata and controls

39 lines (27 loc) · 2.41 KB
title description ms.date ms.custom dev_langs helpviewer_keywords ms.assetid
How to: Apply Multiple Transformations to a 3D Model
Learn how to apply Multiple Transformations to a 3D Model.
03/30/2017
devdivchpfy22
csharp
vb
3D models [WPF], applying multiple transformations to
cb72245a-5560-4c96-9f58-593c66296992

How to: Apply Multiple Transformations to a 3D Model

This sample shows how to use a xref:System.Windows.Media.Media3D.RotateTransform3D and a xref:System.Windows.Media.Media3D.ScaleTransform3D to rotate and change the scale of a 3D model. The code below shows how to apply these transforms to the xref:System.Windows.Media.Media3D.Model3D.Transform%2A property of a xref:System.Windows.Media.Media3D.GeometryModel3D in XAML.

[!code-xaml3DGallery_snip#Multiple3DTransformationsExampleInline1]

In code:

[!code-csharp3DGallery_procedural_snip#Multiple3DTransformationsCodeExampleInline1] [!code-vb3DGallery_procedural_snip#Multiple3DTransformationsCodeExampleInline1]

XAML sample

The following code shows the entire sample in XAML.

[!code-xaml3DGallery_snip#Multiple3DTransformationsExampleWholePage]

Procedural sample code

Below is the entire sample in code.

[!code-csharp3DGallery_procedural_snip#Multiple3DTransformationsCodeExampleWholePage] [!code-vb3DGallery_procedural_snip#Multiple3DTransformationsCodeExampleWholePage]

See also