Get the OpenGL matrix of the transform
| 41 | |
| 42 | // Get the OpenGL matrix of the transform |
| 43 | void Transform::getOpenGLMatrix(decimal* openglMatrix) const { |
| 44 | const Matrix3x3& matrix = mOrientation.getMatrix(); |
| 45 | openglMatrix[0] = matrix[0][0]; openglMatrix[1] = matrix[1][0]; |
| 46 | openglMatrix[2] = matrix[2][0]; openglMatrix[3] = 0.0; |
| 47 | openglMatrix[4] = matrix[0][1]; openglMatrix[5] = matrix[1][1]; |
| 48 | openglMatrix[6] = matrix[2][1]; openglMatrix[7] = 0.0; |
| 49 | openglMatrix[8] = matrix[0][2]; openglMatrix[9] = matrix[1][2]; |
| 50 | openglMatrix[10] = matrix[2][2]; openglMatrix[11] = 0.0; |
| 51 | openglMatrix[12] = mPosition.x; openglMatrix[13] = mPosition.y; |
| 52 | openglMatrix[14] = mPosition.z; openglMatrix[15] = 1.0; |
| 53 | } |