diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-11-20 04:46:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-11-20 04:48:12 +0400 |
commit | 4c017090185f90f62eccd12c9f892964a4ffe93a (patch) | |
tree | 4891304a40b3925bd83390234d6746e019899799 /source/blender/blenlib/intern/math_vector_inline.c | |
parent | 02114a673787257dc93d151b8ea61844df9098e6 (diff) |
Math Library: add dot_m4_v3_row_x/y/z
Diffstat (limited to 'source/blender/blenlib/intern/math_vector_inline.c')
-rw-r--r-- | source/blender/blenlib/intern/math_vector_inline.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c index 0ce5855b16a..ace8e6b48c1 100644 --- a/source/blender/blenlib/intern/math_vector_inline.c +++ b/source/blender/blenlib/intern/math_vector_inline.c @@ -450,6 +450,22 @@ MINLINE float dot_m3_v3_row_z(float M[3][3], const float a[3]) return M[0][2] * a[0] + M[1][2] * a[1] + M[2][2] * a[2]; } +/** + * Almost like mul_m4_v3(), misses adding translation. + */ +MINLINE float dot_m4_v3_row_x(float M[4][4], const float a[3]) +{ + return M[0][0] * a[0] + M[1][0] * a[1] + M[2][0] * a[2]; +} +MINLINE float dot_m4_v3_row_y(float M[4][4], const float a[3]) +{ + return M[0][1] * a[0] + M[1][1] * a[1] + M[2][1] * a[2]; +} +MINLINE float dot_m4_v3_row_z(float M[4][4], const float a[3]) +{ + return M[0][2] * a[0] + M[1][2] * a[1] + M[2][2] * a[2]; +} + MINLINE void madd_v2_v2fl(float r[2], const float a[2], float f) { r[0] += a[0] * f; |