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.
+1
A:
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...
Marc Gravell
2009-05-13 13:50:01
+2
A:
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.
James Cadd
2009-05-13 20:12:05
Surface doesn't have a mousedown - it has touch events. Same idea, though - but you need to figure out what to do when you have 30 touches dragging the same object in different directions ;-p
Marc Gravell
2009-05-13 20:16:02
Oh duh, i guess there's no mouse! Do the touch events come through the same mechanism as the Stylus (i.e. same as touch events in Windows 7)?
James Cadd
2009-05-13 21:51:47
You can put a control(e.g. button) on each side of the cube as a texture and it will work as if you clicked on it, then you can simply implement ClickButton events.
sklitzz
2010-01-21 21:43:33
A:
Take a look at codeplex.com/3DTools. Wrap your ViewPort3D
into Interactive3DDecorator
.
modosansreves
2009-09-07 09:35:54