diff options
author | Daniel Dunbar <daniel@zuster.org> | 2005-08-08 22:50:47 +0400 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2005-08-08 22:50:47 +0400 |
commit | 9c8c51cbe3084cb0628a03e480bbe3304e5019db (patch) | |
tree | bf3c3f32dd84d9e6e735b2e5d2223e1585dda7c1 /source/blender/blenlib | |
parent | 29f06ad76e7c718425e61381c29aa1b985200d62 (diff) |
- added VecLerpf to blenlib
- switch to using DerivedMesh.drawMappedFaceCentersEM to draw
face dots, still need to do some work so this works in all
selection modes (atm it does not work in no-zbuf mode)
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_arithb.h | 7 | ||||
-rw-r--r-- | source/blender/blenlib/intern/arithb.c | 9 |
2 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_arithb.h b/source/blender/blenlib/BLI_arithb.h index 9583f259ab0..901c0c9776a 100644 --- a/source/blender/blenlib/BLI_arithb.h +++ b/source/blender/blenlib/BLI_arithb.h @@ -546,6 +546,13 @@ VecAddf( float *v1, float *v2 ); + void +VecLerpf( + float *target, + float *a, + float *b, + float t +); void VecUpMat3( float *vec, diff --git a/source/blender/blenlib/intern/arithb.c b/source/blender/blenlib/intern/arithb.c index 41f52e2455c..e8317383e3f 100644 --- a/source/blender/blenlib/intern/arithb.c +++ b/source/blender/blenlib/intern/arithb.c @@ -1790,6 +1790,15 @@ void VecSubf(float *v, float *v1, float *v2) v[2]= v1[2]- v2[2]; } +void VecLerpf(float *target, float *a, float *b, float t) +{ + float s = 1.0f-t; + + target[0]= s*a[0] + t*b[0]; + target[1]= s*a[1] + t*b[1]; + target[2]= s*a[2] + t*b[2]; +} + void VecMidf(float *v, float *v1, float *v2) { v[0]= 0.5f*(v1[0]+ v2[0]); |