Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/163.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/string/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ GLM:从矩阵中获取旋转轴_C++_Vector_Glm Math_Direction - Fatal编程技术网

C++ GLM:从矩阵中获取旋转轴

C++ GLM:从矩阵中获取旋转轴,c++,vector,glm-math,direction,C++,Vector,Glm Math,Direction,我有一个glm::mat4矩阵,我对该矩阵进行了多次旋转和平移。我怎样才能得到矩阵的旋转轴呢 它应该是Unity3D相当于gameObject.transform.forward或gameObject.transform.right你看到了吗:矩阵中没有旋转轴这样的东西。。。。旋转轴由应用于其上的变换定义,而不是在应用于的矩阵中定义。但是你可以很容易地提取基向量和位置(我想这就是你想要的)看到了吗

我有一个
glm::mat4矩阵
,我对该矩阵进行了多次旋转和平移。我怎样才能得到矩阵的旋转轴呢


它应该是
Unity3D
相当于
gameObject.transform.forward
gameObject.transform.right

你看到了吗:矩阵中没有旋转轴这样的东西。。。。旋转轴由应用于其上的变换定义,而不是在应用于的矩阵中定义。但是你可以很容易地提取基向量和位置(我想这就是你想要的)看到了吗