diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-05-26 22:36:25 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-05-26 22:36:25 +0400 |
commit | ec8d277c64346770b99716b3c1bbdcd07eae26f6 (patch) | |
tree | e0fc551f658e2585d0ea1c36b8d3e2c373919ef2 /source/blender/blenlib | |
parent | 4cf069a41d0a3c39a39237656cd7e65be1d37924 (diff) |
BLI_math rename functions:
- mult_m4_m4m4 -> mul_m4_m4m4
- mult_m3_m3m4 -> mul_m3_m3m4
these temporary names were used to avoid problems when argument order was switched.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_math_matrix.h | 6 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_matrix.c | 18 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_rotation.c | 6 |
3 files changed, 14 insertions, 16 deletions
diff --git a/source/blender/blenlib/BLI_math_matrix.h b/source/blender/blenlib/BLI_math_matrix.h index e408b223923..723122d7814 100644 --- a/source/blender/blenlib/BLI_math_matrix.h +++ b/source/blender/blenlib/BLI_math_matrix.h @@ -74,10 +74,8 @@ void sub_m4_m4m4(float R[4][4], float A[4][4], float B[4][4]); void mul_m3_m3m3(float R[3][3], float A[3][3], float B[3][3]); void mul_m4_m3m4(float R[4][4], float A[3][3], float B[4][4]); void mul_m4_m4m3(float R[4][4], float A[4][4], float B[3][3]); -/* note: the A,B arguments are reversed compared to previous mul_m4_m4m4 - * function, for consistency with above functions & math notation. */ -void mult_m4_m4m4(float R[4][4], float A[4][4], float B[4][4]); -void mult_m3_m3m4(float R[3][3], float A[4][4], float B[3][3]); +void mul_m4_m4m4(float R[4][4], float A[4][4], float B[4][4]); +void mul_m3_m3m4(float R[3][3], float A[4][4], float B[3][3]); void mul_serie_m3(float R[3][3], float M1[3][3], float M2[3][3], float M3[3][3], float M4[3][3], diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c index 9a8eb17da63..298abfa8c5e 100644 --- a/source/blender/blenlib/intern/math_matrix.c +++ b/source/blender/blenlib/intern/math_matrix.c @@ -142,7 +142,7 @@ void swap_m4m4(float m1[4][4], float m2[4][4]) /******************************** Arithmetic *********************************/ -void mult_m4_m4m4(float m1[4][4], float m3_[4][4], float m2_[4][4]) +void mul_m4_m4m4(float m1[4][4], float m3_[4][4], float m2_[4][4]) { float m2[4][4], m3[4][4]; @@ -215,7 +215,7 @@ void mul_m4_m4m3(float m1[4][4], float m3_[4][4], float m2_[3][3]) } /* m1 = m2 * m3, ignore the elements on the 4th row/column of m3 */ -void mult_m3_m3m4(float m1[3][3], float m3_[4][4], float m2_[3][3]) +void mul_m3_m3m4(float m1[3][3], float m3_[4][4], float m2_[3][3]) { float m2[3][3], m3[4][4]; @@ -298,19 +298,19 @@ void mul_serie_m4(float answ[4][4], float m1[4][4], if (m1 == NULL || m2 == NULL) return; - mult_m4_m4m4(answ, m1, m2); + mul_m4_m4m4(answ, m1, m2); if (m3) { - mult_m4_m4m4(temp, answ, m3); + mul_m4_m4m4(temp, answ, m3); if (m4) { - mult_m4_m4m4(answ, temp, m4); + mul_m4_m4m4(answ, temp, m4); if (m5) { - mult_m4_m4m4(temp, answ, m5); + mul_m4_m4m4(temp, answ, m5); if (m6) { - mult_m4_m4m4(answ, temp, m6); + mul_m4_m4m4(answ, temp, m6); if (m7) { - mult_m4_m4m4(temp, answ, m7); + mul_m4_m4m4(temp, answ, m7); if (m8) { - mult_m4_m4m4(answ, temp, m8); + mul_m4_m4m4(answ, temp, m8); } else copy_m4_m4(answ, temp); } diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c index 93954499d53..44d54365e6a 100644 --- a/source/blender/blenlib/intern/math_rotation.c +++ b/source/blender/blenlib/intern/math_rotation.c @@ -1465,7 +1465,7 @@ void mat4_to_dquat(DualQuat *dq, float basemat[4][4], float mat[4][4]) /* split scaling and rotation, there is probably a faster way to do * this, it's done like this now to correctly get negative scaling */ - mult_m4_m4m4(baseRS, mat, basemat); + mul_m4_m4m4(baseRS, mat, basemat); mat4_to_size(scale, baseRS); dscale[0] = scale[0] - 1.0f; @@ -1485,10 +1485,10 @@ void mat4_to_dquat(DualQuat *dq, float basemat[4][4], float mat[4][4]) copy_v3_v3(baseR[3], baseRS[3]); invert_m4_m4(baseinv, basemat); - mult_m4_m4m4(R, baseR, baseinv); + mul_m4_m4m4(R, baseR, baseinv); invert_m4_m4(baseRinv, baseR); - mult_m4_m4m4(S, baseRinv, baseRS); + mul_m4_m4m4(S, baseRinv, baseRS); /* set scaling part */ mul_serie_m4(dq->scale, basemat, S, baseinv, NULL, NULL, NULL, NULL, NULL); |