diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-01-21 20:43:04 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-01-21 20:43:04 +0400 |
commit | 8cde4e5182fd2bf2bab393db32c0fa460874f82b (patch) | |
tree | 1686f1a2edece343c422c318894e0acf1fb017e2 /source/blender/blenlib/intern/math_vector.c | |
parent | bcdbc579943f21bbd2f4005c7de265d6ee6dc9f9 (diff) |
add an influence slider to mesh cache.
Diffstat (limited to 'source/blender/blenlib/intern/math_vector.c')
-rw-r--r-- | source/blender/blenlib/intern/math_vector.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_vector.c b/source/blender/blenlib/intern/math_vector.c index 743d1fc497b..490ed2a99fb 100644 --- a/source/blender/blenlib/intern/math_vector.c +++ b/source/blender/blenlib/intern/math_vector.c @@ -711,6 +711,19 @@ void msub_vn_vnvn(float *array_tar, const float *array_src_a, const float *array } } +void interp_vn_vn(float *array_tar, const float *array_src, const float t, const int size) +{ + const float s = 1.0f - t; + float *tar = array_tar + (size - 1); + const float *src = array_src + (size - 1); + int i = size; + while (i--) { + *(tar) = (s * *(tar)) + (t * *(src)); + tar--; + src--; + } +} + void fill_vn_i(int *array_tar, const int size, const int val) { int *tar = array_tar + (size - 1); |