diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-04-21 19:34:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-04-21 19:34:20 +0300 |
commit | 83cb3879442ab29cbfc7a0c56af48bef823aa826 (patch) | |
tree | 8b327a5ed4c8cad7af7e641e1384a3ded6a54903 /source/blender/blenlib/BLI_math_geom.h | |
parent | 26ee70099a1864eea2b1ec42d5f000d4bff7e10c (diff) |
BLI math: clamped barycentric weight calculation
Diffstat (limited to 'source/blender/blenlib/BLI_math_geom.h')
-rw-r--r-- | source/blender/blenlib/BLI_math_geom.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h index ffe0ce11cef..ff80d15ea5d 100644 --- a/source/blender/blenlib/BLI_math_geom.h +++ b/source/blender/blenlib/BLI_math_geom.h @@ -356,12 +356,18 @@ void transform_point_by_seg_v3( const float l_dst_p1[3], const float l_dst_p2[3], const float l_src_p1[3], const float l_src_p2[3]); -void barycentric_weights_v2(const float v1[2], const float v2[2], const float v3[2], - const float co[2], float w[3]); -void barycentric_weights_v2_persp(const float v1[4], const float v2[4], const float v3[4], - const float co[2], float w[3]); -void barycentric_weights_v2_quad(const float v1[2], const float v2[2], const float v3[2], const float v4[2], - const float co[2], float w[4]); +void barycentric_weights_v2( + const float v1[2], const float v2[2], const float v3[2], + const float co[2], float w[3]); +void barycentric_weights_v2_clamped( + const float v1[2], const float v2[2], const float v3[2], + const float co[2], float w[3]); +void barycentric_weights_v2_persp( + const float v1[4], const float v2[4], const float v3[4], + const float co[2], float w[3]); +void barycentric_weights_v2_quad( + const float v1[2], const float v2[2], const float v3[2], const float v4[2], + const float co[2], float w[4]); bool barycentric_coords_v2(const float v1[2], const float v2[2], const float v3[2], const float co[2], float w[3]); int barycentric_inside_triangle_v2(const float w[3]); |