==Mat4ToEul==

a utility function to convert 4x4 matrices to a euler rotation, contributed by Joshua Lueng (aligorith)
This commit is contained in:
2006-10-01 16:49:41 +00:00
parent 7e469efd43
commit a88807b6dd
2 changed files with 15 additions and 0 deletions

View File

@@ -155,6 +155,12 @@ Mat3ToEul(
float *eul
);
void
Mat4ToEul(
float tmat[][4],
float *eul
);
void compatible_eul(float *eul, float *oldrot);
void Mat3ToCompatibleEul(float mat[][3], float *eul, float *oldrot);

View File

@@ -2215,6 +2215,15 @@ void Mat3ToEul(float tmat[][3], float *eul)
}
}
void Mat4ToEul(float tmat[][4], float *eul)
{
float tempMat[3][3];
Mat3CpyMat4 (tempMat, tmat);
Mat3Ortho(tempMat);
Mat3ToEul(tempMat, eul);
}
void QuatToEul( float *quat, float *eul)
{
float mat[3][3];