diff options
author | Luca Rood <dev@lucarood.com> | 2017-01-10 22:46:31 +0300 |
---|---|---|
committer | Luca Rood <dev@lucarood.com> | 2017-01-11 00:58:34 +0300 |
commit | 1dbaf0dbcca2c2756b2aa9f849334a5462739ddc (patch) | |
tree | e5692e6b9856db3194761bd8ce6e409d4e9052fb /source/blender/blenlib/intern/math_geom.c | |
parent | da026249abbe058321f815a9ac39c92761e405ea (diff) |
Add mid_v3_v3_array function and remove redundant functions
Other than implementing a `mid_v3_v3_array` function, this removes
`cent_tri_v3` and `cent_quad_v3` in favor of `mid_v3_v3v3v3` and
`mid_v3_v3v3v3v3` respectively.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D2459
Diffstat (limited to 'source/blender/blenlib/intern/math_geom.c')
-rw-r--r-- | source/blender/blenlib/intern/math_geom.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c index 46d963ee268..76dac5487f2 100644 --- a/source/blender/blenlib/intern/math_geom.c +++ b/source/blender/blenlib/intern/math_geom.c @@ -37,20 +37,6 @@ /********************************** Polygons *********************************/ -void cent_tri_v3(float cent[3], const float v1[3], const float v2[3], const float v3[3]) -{ - cent[0] = (v1[0] + v2[0] + v3[0]) / 3.0f; - cent[1] = (v1[1] + v2[1] + v3[1]) / 3.0f; - cent[2] = (v1[2] + v2[2] + v3[2]) / 3.0f; -} - -void cent_quad_v3(float cent[3], const float v1[3], const float v2[3], const float v3[3], const float v4[3]) -{ - cent[0] = 0.25f * (v1[0] + v2[0] + v3[0] + v4[0]); - cent[1] = 0.25f * (v1[1] + v2[1] + v3[1] + v4[1]); - cent[2] = 0.25f * (v1[2] + v2[2] + v3[2] + v4[2]); -} - void cross_tri_v3(float n[3], const float v1[3], const float v2[3], const float v3[3]) { float n1[3], n2[3]; |