Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2016-11-25 08:20:30 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-11-25 08:39:34 +0300
commite1e49fd1a8a5bca7f95ba230a7daf12fb059779b (patch)
tree9913ba1244a0904189361058713489666d64d2dc /source/blender/alembic
parentd30a0239a2fb1bf28befc547d9c4986b6be4d662 (diff)
Math Lib: rotate matrix cleanup
- Remove 'rotate_m2', unlike 'rotate_m4' it created a new matrix duplicating 'angle_to_mat2' - now used instead. (better avoid matching functions having different behavior). - Add 'axis_angle_to_mat4_single', convenience wrapper for 'axis_angle_to_mat3_single'. - Replace 'unit_m4(), rotate_m4()' with a single call to 'axis_angle_to_mat4_single'.
Diffstat (limited to 'source/blender/alembic')
-rw-r--r--source/blender/alembic/intern/abc_transform.cc3
-rw-r--r--source/blender/alembic/intern/abc_util.cc3
2 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/alembic/intern/abc_transform.cc b/source/blender/alembic/intern/abc_transform.cc
index 7f8984f9970..e2fc7674c4e 100644
--- a/source/blender/alembic/intern/abc_transform.cc
+++ b/source/blender/alembic/intern/abc_transform.cc
@@ -92,8 +92,7 @@ void AbcTransformWriter::do_write()
/* Only apply rotation to root camera, parenting will propagate it. */
if (m_object->type == OB_CAMERA && !has_parent_camera(m_object)) {
float rot_mat[4][4];
- unit_m4(rot_mat);
- rotate_m4(rot_mat, 'X', -M_PI_2);
+ axis_angle_to_mat4_single(rot_mat, 'X', -M_PI_2);
mul_m4_m4m4(mat, mat, rot_mat);
}
diff --git a/source/blender/alembic/intern/abc_util.cc b/source/blender/alembic/intern/abc_util.cc
index f87d18605d4..979a72fcf4e 100644
--- a/source/blender/alembic/intern/abc_util.cc
+++ b/source/blender/alembic/intern/abc_util.cc
@@ -221,8 +221,7 @@ void convert_matrix(const Imath::M44d &xform, Object *ob,
if (ob->type == OB_CAMERA) {
float cam_to_yup[4][4];
- unit_m4(cam_to_yup);
- rotate_m4(cam_to_yup, 'X', M_PI_2);
+ axis_angle_to_mat4_single(cam_to_yup, 'X', M_PI_2);
mul_m4_m4m4(r_mat, r_mat, cam_to_yup);
}