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:
authorLukas Tönne <lukas.toenne@gmail.com>2014-09-03 13:20:32 +0400
committerLukas Tönne <lukas.toenne@gmail.com>2015-01-20 11:29:56 +0300
commitccad968e26d4229f2bb35df59c14f184dda61eb3 (patch)
tree1ebd13feac34ca9ebe127b519fb4fc2ee1255413 /source/blender/blenkernel/intern/collision.c
parentf98d388fd3b6225101692de994d64955557b3be5 (diff)
Some more debug elements for hair collisions.
Diffstat (limited to 'source/blender/blenkernel/intern/collision.c')
-rw-r--r--source/blender/blenkernel/intern/collision.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c
index de2d2396007..2c0939359e0 100644
--- a/source/blender/blenkernel/intern/collision.c
+++ b/source/blender/blenkernel/intern/collision.c
@@ -1043,8 +1043,19 @@ static bool cloth_points_collision_response_static(ClothModifierData *clmd, Coll
bounce = 0.0f;
mul_v3_v3fl(impulse, collpair->normal, repulse);
}
+ {
+ float d[3], md[3];
+ mul_v3_v3fl(d, collpair->normal, -collpair->distance);
+ mul_v3_v3fl(md, collpair->normal, -margin_distance);
+ BKE_sim_debug_data_add_vector(clmd->debug_data, collpair->pa, d, 1, 1, 0, "collision", hash_collpair(5, collpair));
+ BKE_sim_debug_data_add_vector(clmd->debug_data, collpair->pa, md, 0, 1, 1, "collision", hash_collpair(6, collpair));
+
+ BKE_sim_debug_data_add_line(clmd->debug_data, collmd->current_x[collpair->bp1].co, collmd->current_x[collpair->bp2].co, 0, 0, 1, "collision", hash_collpair(85, collpair));
+ BKE_sim_debug_data_add_line(clmd->debug_data, collmd->current_x[collpair->bp2].co, collmd->current_x[collpair->bp3].co, 0, 0, 1, "collision", hash_collpair(86, collpair));
+ BKE_sim_debug_data_add_line(clmd->debug_data, collmd->current_x[collpair->bp3].co, collmd->current_x[collpair->bp1].co, 0, 0, 1, "collision", hash_collpair(87, collpair));
+ }
cloth1->verts[collpair->ap1].impulse_count++;
- BKE_sim_debug_data_add_vector(clmd->debug_data, collpair->pa, impulse, 0.0, 1.0, 0.6, "collision", hash_collpair(873, collpair));
+ BKE_sim_debug_data_add_vector(clmd->debug_data, collpair->pa, impulse, 1.0, 1.0, 1.0, "collision", hash_collpair(873, collpair));
result = true;
}