给定一个4x4的均匀矩阵,我怎样才能得到3D世界COORDS?矩阵、均匀、世界、COORDS

由网友(我爱的少年他叫王俊凯)分享简介:让我有这是越来越旋转,然后翻译并再次旋转的对象。我存储这些翻译为对象构件的矩阵。现在,当我来到反对采摘我需要知道这个对象的3D世界COORDS。So i have an object which is getting rotated then translated and rotated again. I am st...

让我有这是越来越旋转,然后翻译并再次旋转的对象。我存储这些翻译为对象构件的矩阵。现在,当我来到反对采摘我需要知道这个对象的3D世界COORDS。

So i have an object which is getting rotated then translated and rotated again. I am storing a matrix of these translations as an object member. Now when i come to object picking i need to know the 3D world coords of this object.

目前我已经能够获得对象的位置,像这样

Currently i have been able to get the position of the object like so

 的coords [0] = finalMatrix [12];

 的coords [1] = finalMatrix [13];

 的coords [2] = finalMatrix [14];

coords[0] = finalMatrix[12];

coords[1] = finalMatrix[13];

coords[2] = finalMatrix[14];

这是给我的对象的正确位置,但我想坐旋转考虑为好。

This is giving me the correct positions of the objects but i want to take the rotations into account as well.

任何帮助将是巨大的......

Any help would be great...

推荐答案

http://www.euclideanspace.com/maths/geometry/affine/matrix4x4/index.htm - 这里是如何解释的4X4矩阵的工作。第一个次要的3x3 - 是一个旋转矩阵。除最后一个元素的最后一列是一个平移向量。和元素[4,4]是一个比例因子。了解更多关于此的链接

http://www.euclideanspace.com/maths/geometry/affine/matrix4x4/index.htm - here is the explanation how the 4x4 matrices work. The first minor 3x3 - is a rotation matrix. The last column except last element is a translation vector. And element[4, 4] is a scale factor. Read more about this at the link

阅读全文

相关推荐

最新文章