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
AgeCommit message (Collapse)Author
2022-11-09Fix T101848: Zeroed matrix converted to a quaternion results in rotationCampbell Barton
Re-order checks to ensure a zeroed matrix results in a quaternion without rotation. Also avoid some redundant calculation where the 'trace' was calculated but not used, flip the scaling value early on instead of negating the quaternion after calculating it.
2022-09-25Cleanup: replace C-style casts with functional casts for numeric typesCampbell Barton
2022-07-28BLI_math: improve symmetrical values from sin_cos_from_fractionCampbell Barton
When plotting equally distant points around a circle support an extra axis of symmetry so twice as many exact values are repeated than originally added in [0], see code-comments for a detailed explanation. Tests to ensure accuracy and exact symmetry have been added too. Follow up on fix for T87779. [0]: 087f27a52f7857887e90754d87a7a73715ebc3fb
2022-04-15Fix: Apply tilt in curves data-block normals calculationHans Goudey
The ported normal calculation from ceed37fc5cbb466a0 neglected to use the tilt attribute to rotate the normals around the tangents. This commit adds that behavior back, adding a new math header file to avoid duplicating the rotation function for normalized axes. Differential Revision: https://developer.blender.org/D14655
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2020-12-14Fix windows build.Alexander Gavrilov
2020-12-13Fix weird Swing+Twist decomposition with noncanonical quaternions.Alexander Gavrilov
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.
2020-12-04Cleanup: Clang-Tidy, modernize-deprecated-headersSybren A. Stüvel
No functional changes.
2020-11-30Fix T83196: bad matrix to quaternion precision near 180 degrees rotation.Alexander Gavrilov
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