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>2013-07-13 10:54:44 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-13 10:54:44 +0400
commitd522a995cfa83616e14f6c738f37787d2517396a (patch)
tree269db42ee6fcc4d56f7205d6fd146efde8600ca5 /source/blender/blenlib/intern/math_matrix.c
parentedb850c842608911f5fb0aa5fde298d8e27bcf67 (diff)
fix for orthogonalize_m3,4, missing break statements in switch.
Diffstat (limited to 'source/blender/blenlib/intern/math_matrix.c')
-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 d798b55e765..5efa4e4acf3 100644
--- a/source/blender/blenlib/intern/math_matrix.c
+++ b/source/blender/blenlib/intern/math_matrix.c
@@ -790,6 +790,7 @@ void orthogonalize_m3(float mat[3][3], int axis)
normalize_v3(mat[2]);
cross_v3_v3v3(mat[1], mat[2], mat[0]);
}
+ break;
case 1:
if (dot_v3v3(mat[1], mat[0]) < 1) {
cross_v3_v3v3(mat[2], mat[0], mat[1]);
@@ -812,6 +813,7 @@ void orthogonalize_m3(float mat[3][3], int axis)
normalize_v3(mat[0]);
cross_v3_v3v3(mat[2], mat[0], mat[1]);
}
+ break;
case 2:
if (dot_v3v3(mat[2], mat[0]) < 1) {
cross_v3_v3v3(mat[1], mat[2], mat[0]);
@@ -834,6 +836,8 @@ void orthogonalize_m3(float mat[3][3], int axis)
normalize_v3(mat[0]);
cross_v3_v3v3(mat[1], mat[2], mat[0]);
}
+ default:
+ BLI_assert(0);
}
mul_v3_fl(mat[0], size[0]);
mul_v3_fl(mat[1], size[1]);
@@ -868,8 +872,8 @@ void orthogonalize_m4(float mat[4][4], int axis)
normalize_v3(mat[2]);
cross_v3_v3v3(mat[1], mat[2], mat[0]);
}
+ break;
case 1:
- normalize_v3(mat[0]);
if (dot_v3v3(mat[1], mat[0]) < 1) {
cross_v3_v3v3(mat[2], mat[0], mat[1]);
normalize_v3(mat[2]);
@@ -891,6 +895,7 @@ void orthogonalize_m4(float mat[4][4], int axis)
normalize_v3(mat[0]);
cross_v3_v3v3(mat[2], mat[0], mat[1]);
}
+ break;
case 2:
if (dot_v3v3(mat[2], mat[0]) < 1) {
cross_v3_v3v3(mat[1], mat[2], mat[0]);
@@ -913,6 +918,9 @@ void orthogonalize_m4(float mat[4][4], int axis)
normalize_v3(mat[0]);
cross_v3_v3v3(mat[1], mat[2], mat[0]);
}
+ break;
+ default:
+ BLI_assert(0);
}
mul_v3_fl(mat[0], size[0]);
mul_v3_fl(mat[1], size[1]);