如何将4个点转换为xna矩阵
我想用 C# 开发自己的 AR 库。我的问题是:我有标记的 4 个角点,想要在标记上显示 3D 立方体(它是一个多标记库),但我不知道如何获取 xna 的矩阵。
I want to develop my own AR-Library in C#. My problem is: I have the 4 corner points of my marker and want to show 3D cubes on the marker (it's a multi-marker lib), but I don't know how to get the matrices for xna.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您正在寻找的术语称为“3d 姿态估计”。看看这个链接:http://www.aforgenet.com/articles/posit/ .它描述了 POSIT 算法,还有一个示例应用程序,其中包括可供下载的源代码。为了方便您,它也是用 C# 编写的。
The term you are looking for is called "3d pose estimation". Have a look at this link: http://www.aforgenet.com/articles/posit/ . It describes the POSIT algorithm and there's also a sample application including source code you can download. Conveniently for you, it's also written in C#.
此视频演示如何将屏幕上触摸的点转换为 XNA 矩阵中的点:
http://bit.ly/WPARBasic
您可能还对 Windows Phone 版 SLARToolkit 感兴趣:
http://slartoolkit.codeplex.com/
以及Geo AR Toolkit for Windows Phone:
http://gart.codeplex.com/
它们都展示了如何获取位置在屏幕上或现实世界中并将它们转换为 XNA 矩阵。
This video shows how to translate a point touched on the screen to a point in an XNA matrix:
http://bit.ly/WPARBasic
You may also be interested in the SLARToolkit for Windows Phone:
http://slartoolkit.codeplex.com/
And the Geo AR Toolkit for Windows Phone:
http://gart.codeplex.com/
They all show how to take locations on the screen or in the real world and convert them to XNA matricies.