From aa42da03859d28900a1d01130f07c38b1e2ad34b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 27 Apr 2019 12:07:07 +1000 Subject: Cleanup: comments (long lines) in blenkernel --- source/blender/blenkernel/intern/collision.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'source/blender/blenkernel/intern/collision.c') diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index a8ca6d40b51..ff6258ac339 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -539,7 +539,8 @@ static int cloth_collision_response_static(ClothModifierData *clmd, sub_v3_v3v3(relativeVelocity, v2, v1); - /* Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal'). */ + /* Calculate the normal component of the relative velocity + * (actually only the magnitude - the direction is stored in 'normal'). */ magrelVel = dot_v3v3(relativeVelocity, collpair->normal); /* If magrelVel < 0 the edges are approaching each other. */ @@ -557,7 +558,8 @@ static int cloth_collision_response_static(ClothModifierData *clmd, sub_v3_v3v3(vrel_t_pre, relativeVelocity, temp); /* Decrease in magnitude of relative tangential velocity due to coulomb friction - * in original formula "magrelVel" should be the "change of relative velocity in normal direction". */ + * in original formula "magrelVel" should be the + * "change of relative velocity in normal direction". */ magtangent = min_ff(collob->pd->pdef_cfrict * 0.01f * magrelVel, len_v3(vrel_t_pre)); /* Apply friction impulse. */ @@ -720,7 +722,8 @@ static int cloth_selfcollision_response_static(ClothModifierData *clmd, sub_v3_v3v3(relativeVelocity, v2, v1); - /* Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal'). */ + /* Calculate the normal component of the relative velocity + * (actually only the magnitude - the direction is stored in 'normal'). */ magrelVel = dot_v3v3(relativeVelocity, collpair->normal); /* TODO: Impulses should be weighed by mass as this is self col, @@ -740,7 +743,8 @@ static int cloth_selfcollision_response_static(ClothModifierData *clmd, sub_v3_v3v3(vrel_t_pre, relativeVelocity, temp); /* Decrease in magnitude of relative tangential velocity due to coulomb friction - * in original formula "magrelVel" should be the "change of relative velocity in normal direction". */ + * in original formula "magrelVel" should be the + * "change of relative velocity in normal direction". */ magtangent = min_ff(clmd->coll_parms->self_friction * 0.01f * magrelVel, len_v3(vrel_t_pre)); /* Apply friction impulse. */ @@ -1548,7 +1552,8 @@ static CollPair *cloth_point_collpair(float p1[3], return collpair; } -//Determines collisions on overlap, collisions are written to collpair[i] and collision+number_collision_found is returned +/* Determines collisions on overlap, + * collisions are written to collpair[i] and collision+number_collision_found is returned. */ static CollPair *cloth_point_collision(ModifierData *md1, ModifierData *md2, BVHTreeOverlap *overlap, @@ -1696,8 +1701,11 @@ void cloth_find_point_contacts(Depsgraph *depsgraph, clmd, collmd, &ct->collisions, &collisions_index, result, overlap, epsilon, dt); ct->totcollisions = (int)(collisions_index - ct->collisions); - // resolve nearby collisions - // ret += cloth_points_objcollisions_resolve(clmd, collmd, collob->pd, collisions[i], collisions_index[i], dt); + /* Resolve nearby collisions. */ +#if 0 + ret += cloth_points_objcollisions_resolve( + clmd, collmd, collob->pd, collisions[i], collisions_index[i], dt); +#endif } if (overlap) { -- cgit v1.2.3