diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-18 03:30:19 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-18 03:30:19 +0400 |
commit | 4a7feafa496b27d21b93d7ff459e580edb00d148 (patch) | |
tree | 732e84c0da36c170c64b64f3aa06219434981310 /source/blender/blenlib | |
parent | ed1a08382f2b9f9d11661d2f4c68c496c49f274a (diff) |
Support object scale for mesh display options. (currently only uniform scale for thickness test)
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_math_matrix.h | 1 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_matrix.c | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_matrix.h b/source/blender/blenlib/BLI_math_matrix.h index 9c5d3c5b93c..ada2d43b81f 100644 --- a/source/blender/blenlib/BLI_math_matrix.h +++ b/source/blender/blenlib/BLI_math_matrix.h @@ -98,6 +98,7 @@ void mul_m3_v3(float M[3][3], float r[3]); void mul_v3_m3v3(float r[3], float M[3][3], const float a[3]); void mul_v2_m3v3(float r[2], float M[3][3], const float a[3]); void mul_transposed_m3_v3(float M[3][3], float r[3]); +void mul_transposed_mat3_m4_v3(float M[4][4], float r[3]); void mul_m3_v3_double(float M[3][3], double r[3]); void mul_m3_fl(float R[3][3], float f); diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c index 1ec63f11c3d..d9063b80f13 100644 --- a/source/blender/blenlib/intern/math_matrix.c +++ b/source/blender/blenlib/intern/math_matrix.c @@ -445,6 +445,18 @@ void mul_transposed_m3_v3(float mat[3][3], float vec[3]) vec[2] = x * mat[2][0] + y * mat[2][1] + mat[2][2] * vec[2]; } +void mul_transposed_mat3_m4_v3(float mat[4][4], float vec[3]) +{ + float x, y; + + x = vec[0]; + y = vec[1]; + vec[0] = x * mat[0][0] + y * mat[0][1] + mat[0][2] * vec[2]; + vec[1] = x * mat[1][0] + y * mat[1][1] + mat[1][2] * vec[2]; + vec[2] = x * mat[2][0] + y * mat[2][1] + mat[2][2] * vec[2]; +} + + void mul_m3_fl(float m[3][3], float f) { int i, j; |