From d599b643b7a1882ea79851e334d7ed133f362bb3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 21 Oct 2012 07:58:38 +0000 Subject: style cleanup: bge, switch statements mostly. also left bmesh decimator on in previous commit. --- source/blender/blenkernel/intern/cloth.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'source/blender/blenkernel/intern/cloth.c') diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 1d23c374852..4e00e1bce0b 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -1050,29 +1050,25 @@ static void cloth_update_springs( ClothModifierData *clmd ) spring->stiffness = 0.0f; - if(spring->type == CLOTH_SPRING_TYPE_STRUCTURAL) - { + if (spring->type == CLOTH_SPRING_TYPE_STRUCTURAL) { spring->stiffness = (cloth->verts[spring->kl].struct_stiff + cloth->verts[spring->ij].struct_stiff) / 2.0f; } - else if(spring->type == CLOTH_SPRING_TYPE_SHEAR) - { + else if (spring->type == CLOTH_SPRING_TYPE_SHEAR) { spring->stiffness = (cloth->verts[spring->kl].shear_stiff + cloth->verts[spring->ij].shear_stiff) / 2.0f; } - else if(spring->type == CLOTH_SPRING_TYPE_BENDING) - { + else if (spring->type == CLOTH_SPRING_TYPE_BENDING) { spring->stiffness = (cloth->verts[spring->kl].bend_stiff + cloth->verts[spring->ij].bend_stiff) / 2.0f; } - else if(spring->type == CLOTH_SPRING_TYPE_GOAL) - { + else if (spring->type == CLOTH_SPRING_TYPE_GOAL) { /* Warning: Appending NEW goal springs does not work because implicit solver would need reset! */ /* Activate / Deactivate existing springs */ - if ((!(cloth->verts[spring->ij].flags & CLOTH_VERT_FLAG_PINNED)) && (cloth->verts[spring->ij].goal > ALMOST_ZERO)) + if ((!(cloth->verts[spring->ij].flags & CLOTH_VERT_FLAG_PINNED)) && + (cloth->verts[spring->ij].goal > ALMOST_ZERO)) { spring->flags &= ~CLOTH_SPRING_FLAG_DEACTIVATE; } - else - { + else { spring->flags |= CLOTH_SPRING_FLAG_DEACTIVATE; } } -- cgit v1.2.3