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>2021-04-01 13:16:09 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-04-01 13:34:35 +0300
commit8a144b73c0116a014ed6f081048ffb6b84255d0b (patch)
tree7aa8a52028b161c00f621364a105b5c7ae41bcda /source/blender/blenlib/BLI_math_matrix.h
parent3f24cfb9582e1c826406301d37808df7ca6aa64c (diff)
BLI_math: add orthogonalize_m#_zero_axes
Expose a this function to initialize any zeroed axes to an orthogonal vector based on other non-zeroed axes. This functionality already existed for `invert_m#_m#_safe_ortho`, expose as a public function as it's useful to be able to fill in zeroed axes of transformation matrices since they may be used in matrix multiplication which would create degenerate matrices.
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 6324963f06a..378095589e8 100644
--- a/source/blender/blenlib/BLI_math_matrix.h
+++ b/source/blender/blenlib/BLI_math_matrix.h
@@ -266,6 +266,9 @@ void orthogonalize_m4(float R[4][4], int axis);
void orthogonalize_m3_stable(float R[3][3], int axis, bool normalize);
void orthogonalize_m4_stable(float R[4][4], int axis, bool normalize);
+bool orthogonalize_m3_zero_axes(float R[3][3], const float unit_length);
+bool orthogonalize_m4_zero_axes(float R[4][4], const float unit_length);
+
bool is_orthogonal_m3(const float mat[3][3]);
bool is_orthogonal_m4(const float mat[4][4]);
bool is_orthonormal_m3(const float mat[3][3]);