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>2015-10-23 19:51:00 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-10-23 19:51:00 +0300
commit9d8a01dba195880c4b3bc8a5fb2914881b3abeca (patch)
treef1c048fb934bad730c4f577862de659dc5490072 /source/blender/blenkernel/intern/object.c
parentd5fb0e517ca998ce39c3c3e46274b91f6d7e5124 (diff)
BLI_math: add invert_qt_normalized
When the quat is known to be unit length, so we can avoid scaling (just conjugate_qt which asserts on non unit quats).
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r--source/blender/blenkernel/intern/object.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index ffb614fdf11..61c4073a2fd 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -1951,7 +1951,7 @@ void BKE_object_mat3_to_rot(Object *ob, float mat[3][3], bool use_compat)
float dquat[4];
mat3_to_quat(ob->quat, mat);
normalize_qt_qt(dquat, ob->dquat);
- invert_qt(dquat);
+ invert_qt_normalized(dquat);
mul_qt_qtqt(ob->quat, dquat, ob->quat);
break;
}
@@ -1963,7 +1963,7 @@ void BKE_object_mat3_to_rot(Object *ob, float mat[3][3], bool use_compat)
/* without drot we could apply 'mat' directly */
mat3_to_quat(quat, mat);
axis_angle_to_quat(dquat, ob->drotAxis, ob->drotAngle);
- invert_qt(dquat);
+ invert_qt_normalized(dquat);
mul_qt_qtqt(quat, dquat, quat);
quat_to_axis_angle(ob->rotAxis, &ob->rotAngle, quat);
break;
@@ -1977,7 +1977,7 @@ void BKE_object_mat3_to_rot(Object *ob, float mat[3][3], bool use_compat)
/* without drot we could apply 'mat' directly */
mat3_to_quat(quat, mat);
eulO_to_quat(dquat, ob->drot, ob->rotmode);
- invert_qt(dquat);
+ invert_qt_normalized(dquat);
mul_qt_qtqt(quat, dquat, quat);
quat_to_mat3(tmat, quat);
/* end drot correction */