Blender Git Commit Log

Git Commits -> Revision 9c0df8e

Revision 9c0df8e by Alexander Gavrilov (master)
December 13, 2020, 19:06 (GMT)
Fix weird Swing+Twist decomposition with noncanonical quaternions.

It turns out that after the fix to T83196 (rB814b2787cadd) the matrix
to quaternion conversion can produce noncanonical results in large
areas of the rotation space, when previously this was limited to
way smaller areas. This in turn causes Swing+Twist math to produce
angles beyond 180 degrees, e.g. outputting a -120..240 range.

This fixes both issues, ensuring that conversion outputs a canonical
result, and decomposition canonifies its input.

This was reported in chat by @jpbouza.

Commit Details:

Full Hash: 9c0df8e27533657f49919e45d46c85c847048d8f
Parent Commit: c607511
Lines Changed: +36, -1

2 Modified Paths:

/source/blender/blenlib/intern/math_rotation.c (+16, -1) (Diff)
/source/blender/blenlib/tests/BLI_math_rotation_test.cc (+20, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021