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
2019-06-12Cleanup: spelling in commentsCampbell Barton
2019-05-31Cleanup: style, use braces in source/Campbell Barton
Automated using clang-tidy.
2019-05-08Cleanup: unused var, doxy syntax for math_matrix.cCampbell Barton
2019-05-07Fix T57767: Pivot point broken after scaling to 0 in a dimensionPhilipp Oeser
matrix inversion was changed in rB01c75c3765eb from own code to EIGEN for performance reasons. EIGEN would return a zero matrix on failure (resulting in the pivot always being at the object origin). This brings back the "old" matrix inversion code (which has the benifit of providing a partial solution which makes the local transform center appear correct) Reviewers: campbellbarton Maniphest Tasks: T57767 Differential Revision: https://developer.blender.org/D4804
2019-05-06Drivers: add an Average Scale option to the Transform Channel driver vars.Alexander Gavrilov
Unlike location and rotation, there is a meaningful definition of overall/average scaling via the total change in the volume. This adds an option to retrieve that via a single driver variable, instead of having to use three and an expression. Using the determinant to compute the volume scaling also allows detecting flipping due to negative scale - this is impossible to do via the three variable approach. The volume_scale functions are added purely for code readability: 'volume scale factor' is easier to understand than determinant. Differential Revision: https://developer.blender.org/D4803
2019-04-21Cleanup: comments (long lines) in blenlibCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-14Complete the set of matrix multiplication functions.Alexander Gavrilov
Also, mul_m3_m3m4 was named incorrectly.
2019-04-14Cleanup: doxy commentsCampbell Barton
Use doxy references to function and enums, also correct some names which became out of sync.
2019-04-13Fix T37500: implement Bendy bone segment deformation interpolation.Alexander Gavrilov
Previously B-Bone deformation mapped every vertex to just one B-Bone segment. This results in abrupt transformation differences between the sides of each threshold plane, reducing the quality of B-Bone deformation and making the use of shape keys impractical. This commit replaces this approach with a linear blend between the two closest segment transformations, effectively representing the B-Bone as two weight-blended plain bones for each vertex. In order to distribute the interpolation more evenly along the bone, segment matrices for deformation are now computed at points between the segments and at the ends of the B-Bone. The computation also uses the true tangents of the Bezier curve for the orientation. The nodes at the end of the bone require some special handling to deal with zero-length Bezier handles caused by a zero ease value. The Copy Transforms constraint now also smoothly interpolates rotation and scaling along the bone shape when enabled. The initial version of the patch was submitted by @Sam200. Differential Revision: https://developer.blender.org/D4635
2019-04-09Cleanup: spellingCampbell Barton
2019-03-27Cleanup: style, use braces for blenlibCampbell Barton
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2019-01-18Math: Make it possible to use vector for both input and outputSergey Sharybin
Avoids nasty code all over where such math is required, and compilers can easily deal with such situation. Don't prefer questionable micro-optimization which comes with a cost of nasty actual logic code.
2019-01-15Cleanup: comment line length (blenlib)Campbell Barton
Prevents clang-format wrapping text before comments.
2018-11-14Merge branch 'master' into blender2.8Campbell Barton
2018-11-14Cleanup: comment block tabsCampbell Barton
2018-10-28BLI: Add comment about to orthogonalize_m3/4Clément Foucault
2018-06-01Cleanup: whitespaceCampbell Barton
2018-06-01Math: optimizations for 4x4x matrix inverse, multiplications.Brecht Van Lommel
In some heavy rigs matrix inverse can be 10% of computation time. This reduces it to 2% by using Eigen's optimized 4x4 matrix inverse and SSE matrix multiplication.
2017-11-14BLI: sync changes from 2.8Campbell Barton
2017-09-05Merge branch 'master' into blender2.8Campbell Barton
2017-09-05Cleanup: use constCampbell Barton
Also use assert w/ rotate_m4.
2017-08-04BLI_math: use const args for mul_m#_seriesCampbell Barton
2017-06-19Merge branch 'master' into blender2.8Campbell Barton
2017-06-19Cleanup: doxygen commentsCampbell Barton
Also remove duplicate & mismatching comments from grease-pencil header. Keep comments close to implementation to avoid getting out of sync.
2017-04-26BLI_math: add helper function to extract XY 2D scale from a 4D matrix.Bastien Montagne
2016-12-01Merge branch 'master' into blender2.8Lukas Tönne
2016-11-25Math Lib: avoid temp array for rotate_m4Campbell Barton
No need to have temp array storage, avoid 2x loops.
2016-11-25Math Lib: rotate matrix cleanupCampbell Barton
- 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'.
2016-09-25port math function from Viewport FXMike Erwin
mul_v4_m4v3(r, M, v) means r = M * vec4(v, 1.0) Based on rB194998766c65
2016-09-25specialize mat3 multiply routinesMike Erwin
Same as 5c6baf1ee9754e39392926cd077bb2097baf39b9 but for 3x3 matrices.
2016-09-25specialize mat4 multiply routinesMike Erwin
mul_m4_m4m4(R, A, B) gives us R = AB in general. Existing code assumed the worst, that A and B both alias the output R. For safety it makes internal copies of A and B before calculating & writing R. This is the least common case. Usually all 3 matrices differ. Often we see M = AM or M = MB, but never M = MM. With this revision mul_m4_m4m4 is called in exactly the same way but copies inputs only when needed. If you know the inputs are independent of the output use the "uniq" variant to skip the saftety checks.
2016-09-24constify BLI_math_matrix inputsMike Erwin
GPU_matrix needs this very soon, and it's good practice in general. also sprinkled in some TODOs for later
2016-06-16BLI_math: Add double versions of functionsCampbell Barton
- mul_v3_m3v3_db - mul_m3_v3_db - negate_v3_db
2016-05-13BLI_math: add 'equals_m4m4' (and 'm3' variant) helpers.Bastien Montagne
2015-12-07Minor changes needed for standalone mathutilsCampbell Barton
2015-10-23BLI_math: add mat3_normalized_to_* functionsCampbell Barton
Many uses of matrices for rotation keep them normalized, so no need to normalize each time.
2015-10-15Error in last commitCampbell Barton
2015-10-15Error in last commitCampbell Barton
2015-10-15BLI_math: add normalize_m#_ex functionsCampbell Barton
Useful when we need to use the axis lengths too.
2015-10-11Fix T46085: UV project modifier artifacts with vertices behind the camera.Brecht Van Lommel
2015-10-09BLI_math: add mat3_polar_decompose, interp_m3_m3m3 and interp_m4_m4m4.Bastien Montagne
mat3_polar_decompose gives the right polar decomposition of given matrix, as a pair (U, P) of matrices. interp_m3_m3m3 uses that polar decomposition to perform a correct matrix interpolation, even with non-uniformly scaled ones (where blend_m3_m3m3 would fail). interp_m4_m4m4 just adds translation interpolation to the _m3 variant.
2015-07-11BLI_matrix space_transform: Add a 'local-invariant' setter.Bastien Montagne
`BLI_space_transform_from_matrices()` defines a 'global-invariant' transform (same point in global space, two different coordinates in local and target spaces). New `BLI_space_transform_global_from_matrices()` is kind of opposite, it defines a 'local-invariant' transform (two different points in global space, same coordinates in local and target spaces). Useful to 'match' meshes.
2015-05-04Fix T44592: Zero scale on an axis, zeros allCampbell Barton
2015-05-04Fixed comment.Lukas Tönne
2015-05-01Fix T43711: dual quaternion deform bug with shearing in deform matrix.Brecht Van Lommel
This also increases the tolerances in is_orthogonal / is_orthonormal functions, which were much too low for practical purposes.
2015-04-27Math Lib: add mul_v3_mat3_m4v3Campbell Barton