我有一个物体,先旋转再平移,然后再旋转。我将这些变换的矩阵存储为对象成员。现在,当我需要选取对象时,我需要知道该对象的三维世界坐标。
目前,我已经能够获取对象的位置,如下所示:
coords[0] = finalMatrix[12]; coords[1] = finalMatrix[13]; coords[2] = finalMatrix[14];
这给出了正确的对象位置,但我也想考虑旋转。
如果有帮助,非常感谢……
目前,我已经能够获取对象的位置,如下所示:
coords[0] = finalMatrix[12]; coords[1] = finalMatrix[13]; coords[2] = finalMatrix[14];
这给出了正确的对象位置,但我也想考虑旋转。
如果有帮助,非常感谢……