[Bf-blender-cvs] [8489b94] master: Math Lib: rename mul_serie_m3 to mul_m3_series & reorder args

Campbell Barton noreply at git.blender.org
Mon Jul 21 11:09:26 CEST 2014


Commit: 8489b94e07f9e73bd3c9c3e4f6a91f1f0a259827
Author: Campbell Barton
Date:   Mon Jul 21 18:55:12 2014 +1000
Branches: master
https://developer.blender.org/rB8489b94e07f9e73bd3c9c3e4f6a91f1f0a259827

Math Lib: rename mul_serie_m3 to mul_m3_series & reorder args

Importantly, reversed mul_serie_m3 argument order (so it matches the m4 function)

===================================================================

M	source/blender/blenkernel/intern/armature.c
M	source/blender/blenkernel/intern/constraint.c
M	source/blender/blenkernel/intern/mask.c
M	source/blender/blenkernel/intern/texture.c
M	source/blender/blenkernel/intern/tracking_stabilize.c
M	source/blender/blenlib/BLI_math_matrix.h
M	source/blender/blenlib/intern/math_matrix.c
M	source/blender/blenlib/intern/math_rotation.c
M	source/blender/bmesh/operators/bmo_utils.c
M	source/blender/collada/AnimationImporter.cpp
M	source/blender/collada/TransformWriter.cpp
M	source/blender/editors/object/object_hook.c
M	source/blender/editors/space_clip/clip_draw.c
M	source/blender/editors/space_clip/tracking_ops.c
M	source/blender/editors/transform/transform.c
M	source/blender/editors/transform/transform_conversions.c
M	source/blender/editors/uvedit/uvedit_unwrap_ops.c
M	source/blender/ikplugin/intern/iksolver_plugin.c
M	source/blender/ikplugin/intern/itasc_plugin.cpp
M	source/blender/modifiers/intern/MOD_array.c
M	source/blender/modifiers/intern/MOD_hook.c
M	source/blender/render/intern/source/convertblender.c

===================================================================

diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index 98b25e4..16b5574 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -574,7 +574,7 @@ void b_bone_spline_setup(bPoseChannel *pchan, int rest, Mat4 result_array[MAX_BB
 
 		if (do_scale) {
 			/* correct for scaling when this matrix is used in scaled space */
-			mul_serie_m4(result_array[a].mat, iscalemat, result_array[a].mat, scalemat);
+			mul_m4_series(result_array[a].mat, iscalemat, result_array[a].mat, scalemat);
 		}
 	}
 }
@@ -622,7 +622,7 @@ static void pchan_b_bone_defmats(bPoseChannel *pchan, bPoseChanDeform *pdef_info
 
 		invert_m4_m4(tmat, b_bone_rest[a].mat);
 
-		mul_serie_m4(b_bone_mats[a + 1].mat, pchan->chan_mat, bone->arm_mat, b_bone[a].mat, tmat, b_bone_mats[0].mat);
+		mul_m4_series(b_bone_mats[a + 1].mat, pchan->chan_mat, bone->arm_mat, b_bone[a].mat, tmat, b_bone_mats[0].mat);
 
 		if (use_quaternion)
 			mat4_to_dquat(&b_bone_dual_quats[a], bone->arm_mat, b_bone_mats[a + 1].mat);
@@ -1041,7 +1041,7 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm, float
 				if (!use_quaternion) /* quaternion already is scale corrected */
 					mul_m3_fl(smat, armature_weight / contrib);
 
-				mul_serie_m3(defMats[i], tmpmat, pre, smat, post);
+				mul_m3_series(defMats[i], post, smat, pre, tmpmat);
 			}
 		}
 
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 4af8b1c..b256f84 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -3909,7 +3909,7 @@ static void followtrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase
 				BKE_tracking_camera_get_reconstructed_interpolate(tracking, tracking_object, framenr, imat);
 				invert_m4(imat);
 
-				mul_serie_m4(cob->matrix, obmat, mat, imat);
+				mul_m4_series(cob->matrix, obmat, mat, imat);
 				translate_m4(cob->matrix, track->bundle_pos[0], track->bundle_pos[1], track->bundle_pos[2]);
 			}
 			else {
@@ -4187,7 +4187,7 @@ static void objectsolver_evaluate(bConstraint *con, bConstraintOb *cob, ListBase
 
 			invert_m4_m4(imat, mat);
 
-			mul_serie_m4(cob->matrix, cammat, imat, camimat, parmat, obmat);
+			mul_m4_series(cob->matrix, cammat, imat, camimat, parmat, obmat);
 		}
 	}
 }
diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c
index e737edb..1c40446 100644
--- a/source/blender/blenkernel/intern/mask.c
+++ b/source/blender/blenkernel/intern/mask.c
@@ -1212,7 +1212,7 @@ void BKE_mask_point_parent_matrix_get(MaskSplinePoint *point, float ctime, float
 						}
 
 						invert_m3_m3(mask_to_clip_matrix, mask_from_clip_matrix);
-						mul_serie_m3(parent_matrix, mask_to_clip_matrix, H, mask_from_clip_matrix);
+						mul_m3_series(parent_matrix, mask_from_clip_matrix, H, mask_to_clip_matrix);
 					}
 				}
 			}
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index 84da03c..105065e 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -145,12 +145,12 @@ void init_tex_mapping(TexMapping *texmap)
 		if (texmap->type == TEXMAP_TYPE_TEXTURE) {
 			/* to transform a texture, the inverse transform needs
 			 * to be applied to the texture coordinate */
-			mul_serie_m4(texmap->mat, tmat, rmat, smat);
+			mul_m4_series(texmap->mat, tmat, rmat, smat);
 			invert_m4(texmap->mat);
 		}
 		else if (texmap->type == TEXMAP_TYPE_POINT) {
 			/* forward transform */
-			mul_serie_m4(texmap->mat, tmat, rmat, smat);
+			mul_m4_series(texmap->mat, tmat, rmat, smat);
 		}
 		else if (texmap->type == TEXMAP_TYPE_VECTOR) {
 			/* no translation for vectors */
diff --git a/source/blender/blenkernel/intern/tracking_stabilize.c b/source/blender/blenkernel/intern/tracking_stabilize.c
index ec8a5ca..eb22402 100644
--- a/source/blender/blenkernel/intern/tracking_stabilize.c
+++ b/source/blender/blenkernel/intern/tracking_stabilize.c
@@ -439,6 +439,6 @@ void BKE_tracking_stabilization_data_to_mat4(int width, int height, float aspect
 	rotate_m4(rotation_mat, 'Z', angle);         /* rotation matrix */
 
 	/* compose transformation matrix */
-	mul_serie_m4(mat, translation_mat, center_mat, aspect_mat, rotation_mat, inv_aspect_mat,
+	mul_m4_series(mat, translation_mat, center_mat, aspect_mat, rotation_mat, inv_aspect_mat,
 	             scale_mat, inv_center_mat);
 }
diff --git a/source/blender/blenlib/BLI_math_matrix.h b/source/blender/blenlib/BLI_math_matrix.h
index 1c1e4e7..68d8e3b 100644
--- a/source/blender/blenlib/BLI_math_matrix.h
+++ b/source/blender/blenlib/BLI_math_matrix.h
@@ -69,33 +69,33 @@ void mul_m4_m4m3(float R[4][4], 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]);
 
-/* mul_serie_m3 */
-void _va_mul_serie_m3_3(float R[3][3], float M1[3][3], float M2[3][3]) ATTR_NONNULL();
-void _va_mul_serie_m3_4(float R[3][3], float M1[3][3], float M2[3][3], float M3[3][3]) ATTR_NONNULL();
-void _va_mul_serie_m3_5(float R[3][3], float M1[3][3], float M2[3][3], float M3[3][3], float M4[3][3]) ATTR_NONNULL();
-void _va_mul_serie_m3_6(float R[3][3], float M1[3][3], float M2[3][3], float M3[3][3], float M4[3][3],
-                        float M5[3][3]) ATTR_NONNULL();
-void _va_mul_serie_m3_7(float R[3][3], float M1[3][3], float M2[3][3], float M3[3][3], float M4[3][3],
-                        float M5[3][3], float M6[3][3]) ATTR_NONNULL();
-void _va_mul_serie_m3_8(float R[3][3], float M1[3][3], float M2[3][3], float M3[3][3], float M4[3][3],
-                        float M5[3][3], float M6[3][3], float M7[3][3]) ATTR_NONNULL();
-void _va_mul_serie_m3_9(float R[3][3], float M1[3][3], float M2[3][3], float M3[3][3], float M4[3][3],
-                        float M5[3][3], float M6[3][3], float M7[3][3], float M8[3][3]) ATTR_NONNULL();
-/* mul_serie_m4 */
-void _va_mul_serie_m4_3(float R[4][4], float M1[4][4], float M2[4][4]) ATTR_NONNULL();
-void _va_mul_serie_m4_4(float R[4][4], float M1[4][4], float M2[4][4], float M3[4][4]) ATTR_NONNULL();
-void _va_mul_serie_m4_5(float R[4][4], float M1[4][4], float M2[4][4], float M3[4][4], float M4[4][4]) ATTR_NONNULL();
-void _va_mul_serie_m4_6(float R[4][4], float M1[4][4], float M2[4][4], float M3[4][4], float M4[4][4],
+/* mul_m3_series */
+void _va_mul_m3_series_3(float R[3][3], float M1[3][3], float M2[3][3]) ATTR_NONNULL();
+void _va_mul_m3_series_4(float R[3][3], float M1[3][3], float M2[3][3], float M3[3][3]) ATTR_NONNULL();
+void _va_mul_m3_series_5(float R[3][3], float M1[3][3], float M2[3][3], float M3[3][3], float M4[3][3]) ATTR_NONNULL();
+void _va_mul_m3_series_6(float R[3][3], float M1[3][3], float M2[3][3], float M3[3][3], float M4[3][3],
+                         float M5[3][3]) ATTR_NONNULL();
+void _va_mul_m3_series_7(float R[3][3], float M1[3][3], float M2[3][3], float M3[3][3], float M4[3][3],
+                         float M5[3][3], float M6[3][3]) ATTR_NONNULL();
+void _va_mul_m3_series_8(float R[3][3], float M1[3][3], float M2[3][3], float M3[3][3], float M4[3][3],
+                         float M5[3][3], float M6[3][3], float M7[3][3]) ATTR_NONNULL();
+void _va_mul_m3_series_9(float R[3][3], float M1[3][3], float M2[3][3], float M3[3][3], float M4[3][3],
+                         float M5[3][3], float M6[3][3], float M7[3][3], float M8[3][3]) ATTR_NONNULL();
+/* mul_m4_series */
+void _va_mul_m4_series_3(float R[4][4], float M1[4][4], float M2[4][4]) ATTR_NONNULL();
+void _va_mul_m4_series_4(float R[4][4], float M1[4][4], float M2[4][4], float M3[4][4]) ATTR_NONNULL();
+void _va_mul_m4_series_5(float R[4][4], float M1[4][4], float M2[4][4], float M3[4][4], float M4[4][4]) ATTR_NONNULL();
+void _va_mul_m4_series_6(float R[4][4], float M1[4][4], float M2[4][4], float M3[4][4], float M4[4][4],
                         float M5[4][4]) ATTR_NONNULL();
-void _va_mul_serie_m4_7(float R[4][4], float M1[4][4], float M2[4][4], float M3[4][4], float M4[4][4],
-                        float M5[4][4], float M6[4][4]) ATTR_NONNULL();
-void _va_mul_serie_m4_8(float R[4][4], float M1[4][4], float M2[4][4], float M3[4][4], float M4[4][4],
-                        float M5[4][4], float M6[4][4], float M7[4][4]) ATTR_NONNULL();
-void _va_mul_serie_m4_9(float R[4][4], float M1[4][4], float M2[4][4], float M3[4][4], float M4[4][4],
-                        float M5[4][4], float M6[4][4], float M7[4][4], float M8[4][4]) ATTR_NONNULL();
-
-#define mul_serie_m3(...) VA_NARGS_CALL_OVERLOAD(_va_mul_serie_m3_, __VA_ARGS__)
-#define mul_serie_m4(...) VA_NARGS_CALL_OVERLOAD(_va_mul_serie_m4_, __VA_ARGS__)
+void _va_mul_m4_series_7(float R[4][4], float M1[4][4], float M2[4][4], float M3[4][4], float M4[4][4],
+                         float M5[4][4], float M6[4][4]) ATTR_NONNULL();
+void _va_mul_m4_series_8(float R[4][4], float M1[4][4], float M2[4][4], float M3[4][4], float M4[4][4],
+                         float M5[4][4], float M6[4][4], float M7[4][4]) ATTR_NONNULL();
+void _va_mul_m4_series_9(float R[4][4], float M1[4][4], float M2[4][4], float M3[4][4], float M4[4][4],
+                         float M5[4][4], float M6[4][4], float M7[4][4], float M8[4][4]) ATTR_NONNULL();
+
+#define mul_m3_series(...) VA_NARGS_CALL_OVERLOAD(_va_mul_m3_series_, __VA_ARGS__)
+#define mul_m4_series(...) VA_NARGS_CALL_OVERLOAD(_va_mul_m4_series_, __VA_ARGS__)
 
 void mul_m4_v3(float M[4][4], float r[3]);
 void mul_v3_m4v3(float r[3], float M[4][4], const float v[3]);
diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c
index 1a4beab..bc39150 100644
--- a/source/blender/blenlib/intern/math_matrix.c
+++ b/source/blender/blenlib/intern/math_matrix.c
@@ -275,93 +275,93 @@ void mul_m4_m3m4(float m1[4][4], float m3_[3][3], float m2_[4][4])
 }
 
 
-/** \name Macro helpers for: mul_serie_m3
+/** \name Macro helpers for: mul_m3_series
  * \{ */
-void _va_mul_serie_m3_3(
+void _va_mul_m3_series_3(
         float r[3][3],
         float m1[3][3], float m2[3][3])
 {
-	mul_m3_m3m

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list