diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-11-07 13:28:59 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-11-07 13:28:59 +0400 |
commit | f727448e10de503be0d89bf8b32b7db1a8a5cac7 (patch) | |
tree | ec487a38c383261f9bf37520ebe862b333f9015a /source/blender/blenlib/BLI_math_matrix.h | |
parent | efc44d0c4de449e2f2a87871319d3842577e1928 (diff) |
fix [#33106] Decimate modifier/collapse give bad result
FLT_EPSILON was too small to use when checking if the edge collapse result is an error.
add invert_m3_m3_ex(), invert_m3_ex() functiosn which take an epsilon to check the determinant, saves calculating it twice per edge collapse.
Diffstat (limited to 'source/blender/blenlib/BLI_math_matrix.h')
-rw-r--r-- | source/blender/blenlib/BLI_math_matrix.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_matrix.h b/source/blender/blenlib/BLI_math_matrix.h index 9e34631d460..0783a7981ea 100644 --- a/source/blender/blenlib/BLI_math_matrix.h +++ b/source/blender/blenlib/BLI_math_matrix.h @@ -98,6 +98,9 @@ void mul_m3_fl(float R[3][3], float f); void mul_m4_fl(float R[4][4], float f); void mul_mat3_m4_fl(float R[4][4], float f); +int invert_m3_ex(float m[3][3], const float epsilon); +int invert_m3_m3_ex(float m1[3][3], float m2[3][3], const float epsilon); + int invert_m3(float R[3][3]); int invert_m3_m3(float R[3][3], float A[3][3]); int invert_m4(float R[4][4]); |