1
好的,我一直坚信四元数是“走出去的路”,而不是试图让音调,偏航,滚动旋转运动。所以,现在我有代码看起来像这样(OBJ-C,但它不应该的问题):glGetMatrix()是什么对象(为什么不是glSetMatrix()呢?)?
[quaternion makeIdentity];
[quaternion setPitch: rotation.x yaw: rotation.y roll: rotation.z];
GLfloat matrix[16];
[quaternion stuffMatrix: &matrix];
matrix[12] = location.x;
matrix[13] = location.y;
matrix[14] = location.z;
// Now what?
// glSetMatrix(matrix); // No, that's not right, is it?!
一旦我把我的四元数来应对各种旋转和填充值成我的矩阵数组,我该如何将当前矩阵设置为这些值?
谢谢!
P.S.是的,我是Open-GL n00b。对不起,如果这是基本的东西;我似乎无法在文档中找到它。
glLoadMatrix。谢谢。 (我知道推&流行...) – Olie 2010-10-25 02:33:32