diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-03-12 23:12:28 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-03-12 23:18:28 +0300 |
commit | 10404e3e56c6f8278cd542feefe7048867086d32 (patch) | |
tree | 6345157705da674d641112437bbf236858898ae2 /source/blender/blenlib | |
parent | b759d3c9c57683114ae8ff91acea4c29b6afb47e (diff) |
Comments: minor clarification
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/intern/math_geom.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c index 3cf26ccf904..58699a0593b 100644 --- a/source/blender/blenlib/intern/math_geom.c +++ b/source/blender/blenlib/intern/math_geom.c @@ -2851,6 +2851,9 @@ bool barycentric_coords_v2(const float v1[2], const float v2[2], const float v3[ /** * \note: using #cross_tri_v2 means locations outside the triangle are correctly weighted + * + * \note This is *exactly* the same calculation as #resolve_tri_uv_v2, + * although it has double precision and is used for texture baking, so keep both. */ void barycentric_weights_v2(const float v1[2], const float v2[2], const float v3[2], const float co[2], float w[3]) { @@ -2890,9 +2893,11 @@ void barycentric_weights_v2_persp(const float v1[4], const float v2[4], const fl } } -/* same as #barycentric_weights_v2 but works with a quad, +/** + * same as #barycentric_weights_v2 but works with a quad, * note: untested for values outside the quad's bounds - * this is #interp_weights_poly_v2 expanded for quads only */ + * this is #interp_weights_poly_v2 expanded for quads only + */ 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]) { @@ -3345,6 +3350,8 @@ void interp_cubic_v3(float x[3], float v[3], const float x1[3], const float v1[3 * Barycentric reverse * * Compute coordinates (u, v) for point \a st with respect to triangle (\a st0, \a st1, \a st2) + * + * \note same basic result as #barycentric_weights_v2, see it's comment for details. */ 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]) |