diff options
author | Joshua Leung <aligorith@gmail.com> | 2006-12-15 01:58:22 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2006-12-15 01:58:22 +0300 |
commit | 4935f0b23149fc2b78d334424c86bda968a74d0d (patch) | |
tree | 4451aafdda1acb31492b6492af0624250795e2ca /source/blender/blenlib | |
parent | f631c2d49ea70a24996224392a6dd3ce1454998f (diff) |
Constraints on bones working in 'local' mode, now obey the Enforce
value for constraints. Only Copy Rotation used to do so.
Note: only enforce values of 0.0 or 1.0 are useful/totally predictable
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_arithb.h | 6 | ||||
-rw-r--r-- | source/blender/blenlib/intern/arithb.c | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_arithb.h b/source/blender/blenlib/BLI_arithb.h index fa7c05cce7c..5453c87e35c 100644 --- a/source/blender/blenlib/BLI_arithb.h +++ b/source/blender/blenlib/BLI_arithb.h @@ -472,6 +472,12 @@ FloatCompare( float limit ); float +FloatLerpf( + float target, + float origin, + float fac +); + float Normalise( float *n ); diff --git a/source/blender/blenlib/intern/arithb.c b/source/blender/blenlib/intern/arithb.c index de06fd3365d..102218d8b99 100644 --- a/source/blender/blenlib/intern/arithb.c +++ b/source/blender/blenlib/intern/arithb.c @@ -969,6 +969,11 @@ int FloatCompare( float *v1, float *v2, float limit) return 0; } +float FloatLerpf( float target, float origin, float fac) +{ + return (fac*target) + (1.0f-fac)*origin; +} + void printvecf( char *str, float v[3]) { printf("%s: %.3f %.3f %.3f\n", str, v[0], v[1], v[2]); |