- Use vector interpolation functions from math_vector module in

curve subdivision operator.
- Added function interp_v4_v4v4().
This commit is contained in:
2010-03-24 17:52:51 +00:00
parent 6ab34157fd
commit fdfb46337c
3 changed files with 22 additions and 26 deletions

View File

@@ -55,6 +55,16 @@ void interp_v3_v3v3(float target[3], const float a[3], const float b[3], const f
target[2]= s*a[2] + t*b[2];
}
void interp_v4_v4v4(float target[4], const float a[4], const float b[4], const 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];
target[3]= s*a[3] + t*b[3];
}
/* weight 3 vectors,
* 'w' must be unit length but is not a vector, just 3 weights */
void interp_v3_v3v3v3(float p[3], const float v1[3], const float v2[3], const float v3[3], const float w[3])