从 OpenGL ES+Android 中的模型矩阵提取旋转角度
给定模型矩阵,提取围绕 xy 和 z 轴的旋转角度的最简单方法是什么? OpenGL ES 或 Android 本身是否有可用的方法(我认为 Matrix 类没有提供任何有用的东西)。
了解如何创建模型矩阵(角度相乘的顺序)以再次提取它们是否很重要?
OpenGL 是否有预定义的执行顺序?
有谁知道关于这个主题的一些好的链接?
What is the simplest way to extract the rotation angles around x y and z axes given a modelmatrix? Are there any methods in OpenGL ES available or in Android itself (the Matrix class does not provide any useful stuff i think).
Is it important to know how the model-matrix was created (in which order the angles were multiplied) to extract them again?
Is there a predefined order how OpenGL does it?
Does anyone know some good links about this topic?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不相信有任何“内置”的东西可以为你解决这些问题,尽管我可能是错的。向下滚动有关旋转矩阵的 Wiki 页面:
http://en.wikipedia.org/wiki/Rotation_matrix
进入 3 维部分后,转到标题为“从轴角度到轴角度的转换”的部分。数学确实很棘手,但并非不可能。
也发现了这一点,这似乎更容易遵循:
http://paulbourke.net/geometry/eulerangle/
I do not believe that there is anything "built in" that is going to figure these out for you, although I could be wrong. Scroll down this wiki page on Rotation matrix:
http://en.wikipedia.org/wiki/Rotation_matrix
To the section titled "Conversion from and to axis-angle" once you get into the section on 3 dimensions. The math is surely tricky, but not impossible.
Found this as well, this seems to be much easier to follow:
http://paulbourke.net/geometry/eulerangle/