diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-28 23:46:33 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-28 23:46:33 +0400 |
commit | c754eaa0f9ace116250d232f806beabb27d28951 (patch) | |
tree | 067c60f7b7a1e7b2fd58598149f14a07c0edeb6d /source/blender/blenlib/intern/math_vector_inline.c | |
parent | fc4a7775112045c604bef0eacbe1dc3cc609d0f3 (diff) |
add inline functions getting a single axis from mul_m3_v3()
Diffstat (limited to 'source/blender/blenlib/intern/math_vector_inline.c')
-rw-r--r-- | source/blender/blenlib/intern/math_vector_inline.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c index d77b1ecf017..eff735ef8d5 100644 --- a/source/blender/blenlib/intern/math_vector_inline.c +++ b/source/blender/blenlib/intern/math_vector_inline.c @@ -418,6 +418,18 @@ MINLINE float mul_project_m4_v3_zfac(float mat[4][4], const float co[3]) (mat[2][3] * co[2]) + mat[3][3]; } +MINLINE float mul_m3_v3_single_x(float M[3][3], const float a[3]) +{ + return M[0][0] * a[0] + M[1][0] * a[1] + M[2][0] * a[2]; +} +MINLINE float mul_m3_v3_single_y(float M[3][3], const float a[3]) +{ + return M[0][1] * a[0] + M[1][1] * a[1] + M[2][1] * a[2]; +} +MINLINE float mul_m3_v3_single_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]; +} MINLINE void madd_v2_v2fl(float r[2], const float a[2], float f) { |