diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2014-03-26 04:57:34 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2014-03-26 04:58:52 +0400 |
commit | b4d259f04476812dba04e7854e5989fe4e06796c (patch) | |
tree | 5843b519137daf48e696e5ad5f97bd773e6b3b26 /source/blender/blenlib/BLI_math_geom.h | |
parent | a7242c3162fd8ac28754b92c3bab8f003f912251 (diff) |
New resolve_tri_uv_v3 util function
Compute barycentric coordinates (u, v) for a point with respect to a
triangle.
This is needed for Cycles baking but we decided to push this
independently of the upcoming main baking changes.
Code adapted from Christer Ericson's Real-Time Collision Detection.
Cleanup, refactoring and review from Campbell Barton.
Diffstat (limited to 'source/blender/blenlib/BLI_math_geom.h')
-rw-r--r-- | source/blender/blenlib/BLI_math_geom.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h index 6889e4f2651..db32701c3ed 100644 --- a/source/blender/blenlib/BLI_math_geom.h +++ b/source/blender/blenlib/BLI_math_geom.h @@ -219,6 +219,7 @@ bool barycentric_coords_v2(const float v1[2], const float v2[2], const float v3[ int barycentric_inside_triangle_v2(const float w[3]); void resolve_tri_uv_v2(float r_uv[2], const float st[2], const float st0[2], const float st1[2], const float st2[2]); +void resolve_tri_uv_v3(float r_uv[2], const float st[3], const float st0[3], const float st1[3], const float st2[3]); void resolve_quad_uv_v2(float r_uv[2], const float st[2], const float st0[2], const float st1[2], const float st2[2], const float st3[2]); void resolve_quad_uv_v2_deriv(float r_uv[2], float r_deriv[2][2], const float st[2], const float st0[2], const float st1[2], const float st2[2], const float st3[2]); |