Set the transform from an OpenGL transform matrix
| 32 | |
| 33 | // Set the transform from an OpenGL transform matrix |
| 34 | void Transform::setFromOpenGL(decimal* openglMatrix) { |
| 35 | Matrix3x3 matrix(openglMatrix[0], openglMatrix[4], openglMatrix[8], |
| 36 | openglMatrix[1], openglMatrix[5], openglMatrix[9], |
| 37 | openglMatrix[2], openglMatrix[6], openglMatrix[10]); |
| 38 | mOrientation = Quaternion(matrix); |
| 39 | mPosition.setAllValues(openglMatrix[12], openglMatrix[13], openglMatrix[14]); |
| 40 | } |
| 41 | |
| 42 | // Get the OpenGL matrix of the transform |
| 43 | void Transform::getOpenGLMatrix(decimal* openglMatrix) const { |