BLI_math: add mat3_normalized_to_* functions

Many uses of matrices for rotation keep them normalized,
so no need to normalize each time.
This commit is contained in:
2015-10-24 07:02:51 +11:00
parent 3a98426ed6
commit fbca69c69a
10 changed files with 204 additions and 107 deletions

View File

@@ -115,8 +115,8 @@ static PyObject *Quaternion_to_euler(QuaternionObject *self, PyObject *args)
quat_to_mat3(mat, tquat);
if (order == EULER_ORDER_XYZ) mat3_to_compatible_eul(eul, eul_compat->eul, mat);
else mat3_to_compatible_eulO(eul, eul_compat->eul, order, mat);
if (order == EULER_ORDER_XYZ) mat3_normalized_to_compatible_eul(eul, eul_compat->eul, mat);
else mat3_normalized_to_compatible_eulO(eul, eul_compat->eul, order, mat);
}
else {
if (order == EULER_ORDER_XYZ) quat_to_eul(eul, tquat);