Sel
Sel

Reputation: 53

Interactive 3D object in Surface

How to create a interactive 3D object in WPF? For example it can be a 3D Cube which can be rotated and with "tap" gesture for each side triggering different action.

Upvotes: 3

Views: 2087

Answers (3)

bohdan_trotsenko
bohdan_trotsenko

Reputation: 5357

Take a look at codeplex.com/3DTools. Wrap your ViewPort3D into Interactive3DDecorator.

Upvotes: 0

James Cadd
James Cadd

Reputation: 12216

Take a look at the ViewPort3D class - it has a camera that you can rotate in 3d. Just hook up a MouseDown event handler and modify the camera position.

http://www.kindohm.com/technical/wpf3dtutorial.htm

Upvotes: 2

Marc Gravell
Marc Gravell

Reputation: 1062512

Interactive 3D effects are certainly doable in WPF/Surface, although it'll take a bit of work. For example, have a look at the stuff here, especially the rolling globe about 1:50 into the first picture. The implementation shown is Surface, but that is largely WPF with some different input mechanisms... Unfortunately, he doesn't show the code...

Upvotes: 1

Related Questions