如何从一个旋转矩阵取出轴? [英] How do I remove axis from a rotation matrix?
本文介绍了如何从一个旋转矩阵取出轴?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个OpenGL任意旋转矩阵,并想除去X'放大器; Y轴,留下我只有Z轴?
I have an opengl arbitrary rotation matrix and would like to remove the X & Y axis, leaving me with only the Z axis?
这可能吗?如何做到这一点的任何指针?
Is this possible? Any pointers on how to do it?
推荐答案
只是想大声在这里,但你不能使用矩阵旋转状(1,0,0)的向量,然后做ATAN2(Y, x)的,看看有多少它的旋转,然后建立一个新的矩阵由很多通过Z轴旋转?
Just thinking out loud here, but can't you use the matrix to rotate a vector like (1,0,0), then do atan2(y,x) to see how much it's rotated and then build a new matrix to rotate through the Z axis by that much?
这篇关于如何从一个旋转矩阵取出轴?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文