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:
authorCampbell Barton <ideasman42@gmail.com>2012-04-29 19:47:02 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-29 19:47:02 +0400
commite701f9b67010279db02ceb51f7d08078cb34170a (patch)
tree22134b33527f2d3a1b05f4265422bf5d98420bbc /source/blender/blenkernel/intern/cloth.c
parent038c12895f50a97607dd372cb0780c55eb38fe22 (diff)
style cleanup: whitespace / commas
Diffstat (limited to 'source/blender/blenkernel/intern/cloth.c')
-rw-r--r--source/blender/blenkernel/intern/cloth.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index 97baaad430b..d262dffd517 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -66,11 +66,11 @@ static struct timeval _tstart, _tend;
static struct timezone tz;
void tstart ( void )
{
- gettimeofday ( &_tstart, &tz );
+ gettimeofday(&_tstart, &tz);
}
-void tend ( void )
+void tend (void)
{
- gettimeofday ( &_tend,&tz );
+ gettimeofday(&_tend, &tz);
}
double tval(void)
{
@@ -746,7 +746,7 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm )
// ABS ( clmd->sim_parms->maxgoal - clmd->sim_parms->mingoal );
*/
- verts->goal = ( float ) pow ( verts->goal , 4.0f );
+ verts->goal = powf(verts->goal, 4.0f);
if ( verts->goal >=SOFTGOALSNAP ) {
verts->flags |= CLOTH_VERT_FLAG_PINNED;
}
@@ -781,7 +781,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d
MVert *mvert = NULL;
ClothVertex *verts = NULL;
float (*shapekey_rest)[3]= NULL;
- float tnull[3] = {0,0,0};
+ float tnull[3] = {0, 0, 0};
Cloth *cloth = NULL;
float maxdist = 0;
@@ -984,7 +984,7 @@ static void cloth_free_errorsprings(Cloth *cloth, EdgeHash *UNUSED(edgehash), Li
if (edgelist) {
for ( i = 0; i < cloth->numverts; i++ ) {
- BLI_linklist_free ( edgelist[i],NULL );
+ BLI_linklist_free ( edgelist[i], NULL );
}
MEM_freeN ( edgelist );
@@ -1141,7 +1141,7 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
spring->restlen = len_v3v3(cloth->verts[spring->kl].xrest, cloth->verts[spring->ij].xrest);
spring->type = CLOTH_SPRING_TYPE_BENDING;
spring->stiffness = (cloth->verts[spring->kl].bend_stiff + cloth->verts[spring->ij].bend_stiff) / 2.0f;
- BLI_edgehash_insert ( edgehash, spring->ij, spring->kl, NULL );
+ BLI_edgehash_insert(edgehash, spring->ij, spring->kl, NULL);
bend_springs++;
BLI_linklist_prepend ( &cloth->springs, spring );
@@ -1190,14 +1190,14 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
/* insert other near springs in edgehash AFTER bending springs are calculated (for selfcolls) */
for (i = 0; i < numedges; i++) { /* struct springs */
- BLI_edgehash_insert ( edgehash, MIN2(medge[i].v1, medge[i].v2), MAX2(medge[i].v2, medge[i].v1), NULL );
+ BLI_edgehash_insert(edgehash, MIN2(medge[i].v1, medge[i].v2), MAX2(medge[i].v2, medge[i].v1), NULL);
}
for (i = 0; i < numfaces; i++) { /* edge springs */
if (mface[i].v4) {
- BLI_edgehash_insert ( edgehash, MIN2(mface[i].v1, mface[i].v3), MAX2(mface[i].v3, mface[i].v1), NULL );
+ BLI_edgehash_insert(edgehash, MIN2(mface[i].v1, mface[i].v3), MAX2(mface[i].v3, mface[i].v1), NULL);
- BLI_edgehash_insert ( edgehash, MIN2(mface[i].v2, mface[i].v4), MAX2(mface[i].v2, mface[i].v4), NULL );
+ BLI_edgehash_insert(edgehash, MIN2(mface[i].v2, mface[i].v4), MAX2(mface[i].v2, mface[i].v4), NULL);
}
}
@@ -1206,7 +1206,7 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
if ( edgelist ) {
for ( i = 0; i < numverts; i++ ) {
- BLI_linklist_free ( edgelist[i],NULL );
+ BLI_linklist_free ( edgelist[i], NULL );
}
MEM_freeN ( edgelist );
@@ -1214,8 +1214,8 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
cloth->edgehash = edgehash;
- if (G.rt>0)
- printf("avg_len: %f\n",clmd->sim_parms->avg_spring_len);
+ if (G.rt > 0)
+ printf("avg_len: %f\n", clmd->sim_parms->avg_spring_len);
return 1;