Blender Git Loki

Git Commits -> Revision 814b278

Revision 814b278 by Alexander Gavrilov (master)
November 30, 2020, 18:46 (GMT)
Fix T83196: bad matrix to quaternion precision near 180 degrees rotation.

Adjust the threshold for switching from the base case to trace > 0,
based on very similar example code from www.euclideanspace.com to
avoid float precision issues when trace is close to -1.

Also, remove conversions to and from double, because using double
here doesn't really have benefit, especially with the new threshold.

Finally, add quaternion-matrix-quaternion round trip tests with
full coverage for all 4 branches.

Differential Revision: https://developer.blender.org/D9675

Commit Details:

Full Hash: 814b2787caddf5bd81477bd7b5dea8c45c402a72
Parent Commit: 6022103
Lines Changed: +167, -28

1 Added Path:

/source/blender/blenlib/tests/BLI_math_rotation_test.cc (+128, -0) (View)

2 Modified Paths:

/source/blender/blenlib/CMakeLists.txt (+1, -0) (Diff)
/source/blender/blenlib/intern/math_rotation.c (+38, -28) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021