Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Rood <dev@lucarood.com>2017-01-11 20:15:54 +0300
committerLuca Rood <dev@lucarood.com>2017-01-11 22:55:13 +0300
commitc910beaa2133989150cdafa556ca11ddc9fffc92 (patch)
tree7cbdfb275a7bd1e37a21c9654c8f56d1edb026c9 /source/blender/blenkernel/intern/dynamicpaint.c
parent0507b3e4c41ff058c00b7a45d937d82939b4e0d5 (diff)
Split interp_weights_face_v3 into specific functions for tris and quads
This splits `interp_weights_face_v3` into `interp_weights_tri_v3` and `interp_weights_quad_v3`, in order to properly handle three sided polygons without needing a useless extra index in your weight array. This also improves clarity and consistency with other math_geom functions, thus reducing potential future errors. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D2461
Diffstat (limited to 'source/blender/blenkernel/intern/dynamicpaint.c')
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 4d9e314afc4..1d198e36e05 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -3739,7 +3739,7 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex(
/* velocity brush, only do on main sample */
if (brush->flags & MOD_DPAINT_USES_VELOCITY && ss == 0 && brushVelocity) {
- float weights[4];
+ float weights[3];
float brushPointVelocity[3];
float velocity[3];
@@ -3748,7 +3748,7 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex(
const int v3 = mloop[mlooptri[hitTri].tri[2]].v;
/* calculate barycentric weights for hit point */
- interp_weights_face_v3(weights, mvert[v1].co, mvert[v2].co, mvert[v3].co, NULL, hitCoord);
+ interp_weights_tri_v3(weights, mvert[v1].co, mvert[v2].co, mvert[v3].co, hitCoord);
/* simple check based on brush surface velocity,
* todo: perhaps implement something that handles volume movement as well */