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:
-rw-r--r--source/blender/blenlib/intern/math_matrix.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c
index 33e272ed7eb..48884082dd8 100644
--- a/source/blender/blenlib/intern/math_matrix.c
+++ b/source/blender/blenlib/intern/math_matrix.c
@@ -28,7 +28,9 @@
#include "BLI_strict_flags.h"
-#include "eigen_capi.h"
+#ifndef MATH_STANDALONE
+# include "eigen_capi.h"
+#endif
/********************************* Init **************************************/
@@ -1152,9 +1154,11 @@ bool invert_m4(float m[4][4])
*/
bool invert_m4_m4_fallback(float inverse[4][4], const float mat[4][4])
{
+#ifndef MATH_STANDALONE
if (EIG_invert_m4_m4(inverse, mat)) {
return true;
}
+#endif
int i, j, k;
double temp;
@@ -1222,9 +1226,13 @@ bool invert_m4_m4_fallback(float inverse[4][4], const float mat[4][4])
bool invert_m4_m4(float inverse[4][4], const float mat[4][4])
{
+#ifndef MATH_STANDALONE
/* Use optimized matrix inverse from Eigen, since performance
* impact of this function is significant in complex rigs. */
return EIG_invert_m4_m4(inverse, mat);
+#else
+ return invert_m4_m4_fallback(inverse, mat);
+#endif
}
/****************************** Linear Algebra *******************************/