WPF和3D创建碗效果
如何使用 WPF 的 3D 组件或使用伪 3D 效果来创建“碗”效果,其中用户俯视碗,可以在矩形周围拖动并使矩形透视发生变化,使其看起来像就像它们在碗上、下和周围移动一样?我不追求任何重力效果或任何东西,只是当项目移动时,我需要调整它们的视角...
编辑:我一直在研究 WPF 中可用的实际 3D 效果,它们看起来确实非常非常强大,所以也许有人可以帮助我在我的应用程序上获得一个半球体,然后将一些 3D 网格(矩形)绑定到其表面吗?
有什么想法吗?
谢谢, 标记
How would one go about either using the 3D components of WPF or using a pseudo 3D effect to create a "Bowl" effect, where the user is looking down on a bowl and can drag around rectangles and have the rectangles perspective change so that it looks like they move up, down and around the bowl? I'm not after any gravity effects or anything, just when the items move, I need their perspective to be adjusted...
EDIT: I have been looking into the actual 3D effects available in WPF which do seem very very powerful, so maybe someone could help in getting a half sphere on my app and then binging some 3D meshes (rectangles) to its surface?
Any thoughts?
Thanks,
Mark
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
啊,对了,就在这里 - 现在您可以将红色矩形拖动到碗周围 - 享受吧!
以及背后的代码...
Ahh right, here you go then - you can drag the red rectangle around the bowl now - enjoy!
and the code behind ...
给你,我不太确定你所说的矩形是什么意思,所以我只是在绿色碗的开口周围添加了四个红色矩形。
干杯,
Andy
首先是
Xaml ……下面是背后的代码……
Here you go, I wasn't quite sure what you meant about the rectangles so I've just added four red rectangles around the opening of a green bowl.
Cheers,
Andy
Xaml first ...
... and heres the code behind ...