WP7 透视变换(3D 矩阵与平面投影)
我正在查看这个应用程序:http://www.ztitch.com/index.html 并且想知道他们是如何完成所有 3D 内容的...看起来他并没有使用 Silverlight 中内置的 3D 旋转 (PlaneProjection),但他一定是在使用 3D 矩阵投影做一些事情...
什么数学具体涉及这件事吗?这是真正的旋转,还是应用程序只是在图片靠近屏幕边缘时将图片“倾斜”成梯形,使其看起来像是在球体中?
PS 我认为这不是内置 3D 旋转的主要原因是因为没有任何深度战斗 - 后面的图像始终在后面,无论它以什么角度旋转......
I was taking a look at this app: http://www.ztitch.com/index.html and was wondering how they did all of the 3D stuff... It doesn't look like he is using the built in 3D rotations (PlaneProjection) in Silverlight, but he must be doing something with 3D Matrix Projections...
What math is involved in this specifically? Is it true rotation or is the app just "skewing" the pictures into a trapezoid shape when they get closer to the edge of the screen to make it appear as if the images were in a sphere?
P.S. The main reason I think this isn't the built in 3D rotation is because there isn't any depth-fighting-- an image in the back is always in the back, regardless of what angle it's rotated at...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
他们确实使用球坐标系来显示其中的图像。
Z-fighting 可以通过深度偏差或图像比例(球体大小)进行配置(浮动应该足以满足您的任务)。
您还可以在此处获取一些代码。
They do use Spherical Coordinate System for displaying images inside it.
Z-fighting can be configured through depth bias or image proportions (sphere size) (float should be enough for your task).
Also you can get some code here.