如何从旋转矩阵中删除轴? [英] How do I remove axis from a rotation matrix?

查看:21
本文介绍了如何从旋转矩阵中删除轴?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆