简体   繁体   English

Surface中的交互式3D对象

[英]Interactive 3D object in Surface

How to create a interactive 3D object in WPF? 如何在WPF中创建交互式3D对象? For example it can be a 3D Cube which can be rotated and with "tap" gesture for each side triggering different action. 例如,它可以是3D立方体,其可以被旋转并且每个侧面的“轻敲”手势触发不同的动作。

Take a look at the ViewPort3D class - it has a camera that you can rotate in 3d. 看看ViewPort3D类 - 它有一个可以在3d中旋转的摄像头。 Just hook up a MouseDown event handler and modify the camera position. 只需挂钩MouseDown事件处理程序并修改摄像头位置。

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

Interactive 3D effects are certainly doable in WPF/Surface, although it'll take a bit of work. 交互式3D 效果在WPF / Surface中肯定是可行的,尽管它需要一些工作。 For example, have a look at the stuff here , especially the rolling globe about 1:50 into the first picture. 例如,看看这里东西 ,特别是在第一张照片中大约1:50的滚动地球。 The implementation shown is Surface, but that is largely WPF with some different input mechanisms... Unfortunately, he doesn't show the code... 显示的实现是Surface,但这主要是带有一些不同输入机制的WPF ......不幸的是,他没有显示代码......

Take a look at codeplex.com/3DTools . 看看codeplex.com/3DTools Wrap your ViewPort3D into Interactive3DDecorator . ViewPort3D包装到Interactive3DDecorator

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM