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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-08-25 05:35:44 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-08-25 05:57:56 +0300
commit96401e2ef86809759d30cbc1d1b8ba0b666f5f4c (patch)
tree6f7f992eb102bca35456f40fc186c1e109c508ee /source/blender/blenlib/BLI_math_matrix.h
parent46eca3366efbdc83e4dcfbd9ac4cd23f70da6399 (diff)
BLI_math_matrix: add invert_m4_m4_safe_ortho (m3 version too)
Unlike invert_m4_m4_safe, this calculates zeroed axes. Useful when we need to use the inverse of an objects matrix, keeping the valid axis, only filling in the zeroed ones.
Diffstat (limited to 'source/blender/blenlib/BLI_math_matrix.h')
-rw-r--r--source/blender/blenlib/BLI_math_matrix.h3
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 a00fdaa0ae9..09f2d5a7cdc 100644
--- a/source/blender/blenlib/BLI_math_matrix.h
+++ b/source/blender/blenlib/BLI_math_matrix.h
@@ -299,6 +299,9 @@ bool has_zero_axis_m4(const float matrix[4][4]);
void invert_m4_m4_safe(float Ainv[4][4], const float A[4][4]);
+void invert_m3_m3_safe_ortho(float Ainv[3][3], const float A[3][3]);
+void invert_m4_m4_safe_ortho(float Ainv[4][4], const float A[4][4]);
+
/****************************** Transformations ******************************/
void scale_m3_fl(float R[3][3], float scale);