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-10-22 12:15:51 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-22 12:15:51 +0400
commitddc2dbc2a47ed2439a62e82ad6fba7d8c9dcae28 (patch)
treea7ca593a96652e6f0a784b5c6e37ab2c35b07159 /source/blender/blenkernel
parent30fd258a0b407419a369fbb2818c49df6b70968e (diff)
style cleanup
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/boids.c18
-rw-r--r--source/blender/blenkernel/intern/cloth.c2
-rw-r--r--source/blender/blenkernel/intern/effect.c4
-rw-r--r--source/blender/blenkernel/intern/implicit.c52
-rw-r--r--source/blender/blenkernel/intern/library.c2
-rw-r--r--source/blender/blenkernel/intern/material.c2
-rw-r--r--source/blender/blenkernel/intern/particle_system.c62
-rw-r--r--source/blender/blenkernel/intern/pointcache.c6
-rw-r--r--source/blender/blenkernel/intern/sca.c4
-rw-r--r--source/blender/blenkernel/intern/softbody.c22
10 files changed, 88 insertions, 86 deletions
diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c
index aafc7fe89b4..43f795eeee5 100644
--- a/source/blender/blenkernel/intern/boids.c
+++ b/source/blender/blenkernel/intern/boids.c
@@ -956,7 +956,8 @@ void boid_brain(BoidBrainData *bbd, int p, ParticleData *pa)
// }
//}
- bbd->wanted_co[0]=bbd->wanted_co[1]=bbd->wanted_co[2]=bbd->wanted_speed=0.0f;
+ zero_v3(bbd->wanted_co);
+ bbd->wanted_speed = 0.0f;
/* create random seed for every particle & frame */
rand = (int)(PSYS_FRAND(psys->seed + p) * 1000);
@@ -990,7 +991,8 @@ void boid_brain(BoidBrainData *bbd, int p, ParticleData *pa)
add_v3_v3(wanted_co, bbd->wanted_co);
wanted_speed += bbd->wanted_speed;
n++;
- bbd->wanted_co[0]=bbd->wanted_co[1]=bbd->wanted_co[2]=bbd->wanted_speed=0.0f;
+ zero_v3(bbd->wanted_co);
+ bbd->wanted_speed = 0.0f;
}
}
@@ -1266,9 +1268,9 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
{
float grav[3];
- grav[0]= 0.0f;
- grav[1]= 0.0f;
- grav[2]= bbd->sim->scene->physics_settings.gravity[2] < 0.0f ? -1.0f : 0.0f;
+ grav[0] = 0.0f;
+ grav[1] = 0.0f;
+ grav[2] = bbd->sim->scene->physics_settings.gravity[2] < 0.0f ? -1.0f : 0.0f;
/* don't take forward acceleration into account (better banking) */
if (dot_v3v3(bpa->data.acc, pa->state.vel) > 0.0f) {
@@ -1309,9 +1311,9 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
{
float grav[3];
- grav[0]= 0.0f;
- grav[1]= 0.0f;
- grav[2]= bbd->sim->scene->physics_settings.gravity[2] < 0.0f ? -1.0f : 0.0f;
+ grav[0] = 0.0f;
+ grav[1] = 0.0f;
+ grav[2] = bbd->sim->scene->physics_settings.gravity[2] < 0.0f ? -1.0f : 0.0f;
/* gather apparent gravity */
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index 4e00e1bce0b..88dfb4577d5 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -824,7 +824,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d
int i = 0;
MVert *mvert = NULL;
ClothVertex *verts = NULL;
- float (*shapekey_rest)[3]= NULL;
+ float (*shapekey_rest)[3] = NULL;
float tnull[3] = {0, 0, 0};
Cloth *cloth = NULL;
float maxdist = 0;
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index 9b2439d285a..88490dbb960 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -828,7 +828,7 @@ static void do_physical_effector(EffectorCache *eff, EffectorData *efd, Effected
{
PartDeflect *pd = eff->pd;
RNG *rng = pd->rng;
- float force[3]={0, 0, 0};
+ float force[3] = {0, 0, 0};
float temp[3];
float fac;
float strength = pd->f_strength;
@@ -1020,7 +1020,7 @@ void pdDoEffectors(ListBase *effectors, ListBase *colliders, EffectorWeights *we
do_texture_effector(eff, &efd, point, force);
}
else {
- float temp1[3]={0, 0, 0}, temp2[3];
+ float temp1[3] = {0, 0, 0}, temp2[3];
copy_v3_v3(temp1, force);
do_physical_effector(eff, &efd, point, force);
diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c
index d1ef5d7376b..9201ac463e3 100644
--- a/source/blender/blenkernel/intern/implicit.c
+++ b/source/blender/blenkernel/intern/implicit.c
@@ -1218,7 +1218,7 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s,
float stretch_force[3] = {0, 0, 0};
float bending_force[3] = {0, 0, 0};
float damping_force[3] = {0, 0, 0};
- float nulldfdx[3][3]={ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
+ float nulldfdx[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
float scaling = 0.0;
@@ -1356,15 +1356,15 @@ static void CalcFloat( float *v1, float *v2, float *v3, float *n)
{
float n1[3], n2[3];
- n1[0]= v1[0]-v2[0];
- n2[0]= v2[0]-v3[0];
- n1[1]= v1[1]-v2[1];
- n2[1]= v2[1]-v3[1];
- n1[2]= v1[2]-v2[2];
- n2[2]= v2[2]-v3[2];
- n[0]= n1[1]*n2[2]-n1[2]*n2[1];
- n[1]= n1[2]*n2[0]-n1[0]*n2[2];
- n[2]= n1[0]*n2[1]-n1[1]*n2[0];
+ n1[0] = v1[0]-v2[0];
+ n2[0] = v2[0]-v3[0];
+ n1[1] = v1[1]-v2[1];
+ n2[1] = v2[1]-v3[1];
+ n1[2] = v1[2]-v2[2];
+ n2[2] = v2[2]-v3[2];
+ n[0] = n1[1]*n2[2]-n1[2]*n2[1];
+ n[1] = n1[2]*n2[0]-n1[0]*n2[2];
+ n[2] = n1[0]*n2[1]-n1[1]*n2[0];
}
static void CalcFloat4( float *v1, float *v2, float *v3, float *v4, float *n)
@@ -1372,17 +1372,17 @@ static void CalcFloat4( float *v1, float *v2, float *v3, float *v4, float *n)
/* real cross! */
float n1[3], n2[3];
- n1[0]= v1[0]-v3[0];
- n1[1]= v1[1]-v3[1];
- n1[2]= v1[2]-v3[2];
+ n1[0] = v1[0]-v3[0];
+ n1[1] = v1[1]-v3[1];
+ n1[2] = v1[2]-v3[2];
- n2[0]= v2[0]-v4[0];
- n2[1]= v2[1]-v4[1];
- n2[2]= v2[2]-v4[2];
+ n2[0] = v2[0]-v4[0];
+ n2[1] = v2[1]-v4[1];
+ n2[2] = v2[2]-v4[2];
- n[0]= n1[1]*n2[2]-n1[2]*n2[1];
- n[1]= n1[2]*n2[0]-n1[0]*n2[2];
- n[2]= n1[0]*n2[1]-n1[1]*n2[0];
+ n[0] = n1[1]*n2[2]-n1[2]*n2[1];
+ n[1] = n1[2]*n2[0]-n1[0]*n2[2];
+ n[2] = n1[0]*n2[1]-n1[1]*n2[0];
}
static float calculateVertexWindForce(float wind[3], float vertexnormal[3])
@@ -1544,7 +1544,7 @@ static void cloth_calc_force(ClothModifierData *clmd, float UNUSED(frame), lfVec
lfVector *winvec;
EffectedPoint epoint;
- tm2[0][0]= tm2[1][1]= tm2[2][2]= -spring_air;
+ tm2[0][0] = tm2[1][1] = tm2[2][2] = -spring_air;
/* global acceleration (gravitation) */
if (clmd->scene->physics_settings.flag & PHYS_GLOBAL_GRAVITY) {
@@ -1588,9 +1588,9 @@ static void cloth_calc_force(ClothModifierData *clmd, float UNUSED(frame), lfVec
}
for (i = 0; i < cloth->numfaces; i++) {
- float trinormal[3]={0, 0, 0}; // normalized triangle normal
- float triunnormal[3]={0, 0, 0}; // not-normalized-triangle normal
- float tmp[3]={0, 0, 0};
+ float trinormal[3] = {0, 0, 0}; // normalized triangle normal
+ float triunnormal[3] = {0, 0, 0}; // not-normalized-triangle normal
+ float tmp[3] = {0, 0, 0};
float factor = (mfaces[i].v4) ? 0.25 : 1.0 / 3.0;
factor *= 0.02;
@@ -1628,9 +1628,9 @@ static void cloth_calc_force(ClothModifierData *clmd, float UNUSED(frame), lfVec
/* Hair has only edges */
if (cloth->numfaces == 0) {
ClothSpring *spring;
- float edgevec[3]={0, 0, 0}; //edge vector
- float edgeunnormal[3]={0, 0, 0}; // not-normalized-edge normal
- float tmp[3]={0, 0, 0};
+ float edgevec[3] = {0, 0, 0}; //edge vector
+ float edgeunnormal[3] = {0, 0, 0}; // not-normalized-edge normal
+ float tmp[3] = {0, 0, 0};
float factor = 0.01;
search = cloth->springs;
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 83e7274dfc9..2f5e48e0ac6 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -1200,7 +1200,7 @@ static int check_for_dupid(ListBase *lb, ID *id, char *name)
char left[MAX_ID_NAME + 8], leftest[MAX_ID_NAME + 8];
/* make sure input name is terminated properly */
- /* if ( strlen(name) > MAX_ID_NAME-3 ) name[MAX_ID_NAME-3]= 0; */
+ /* if ( strlen(name) > MAX_ID_NAME-3 ) name[MAX_ID_NAME-3] = 0; */
/* removed since this is only ever called from one place - campbell */
while (1) {
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 2f04df06d66..ea317956255 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -1159,7 +1159,7 @@ void material_drivers_update(Scene *scene, Material *ma, float ctime)
/* ****************** */
#if 0 /* UNUSED */
-static char colname_array[125][20]= {
+static char colname_array[125][20] = {
"Black", "DarkRed", "HalfRed", "Red", "Red",
"DarkGreen", "DarkOlive", "Brown", "Chocolate", "OrangeRed",
"HalfGreen", "GreenOlive", "DryOlive", "Goldenrod", "DarkOrange",
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index c1501ccc359..d3f416b34ae 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -369,10 +369,10 @@ void psys_calc_dmcache(Object *ob, DerivedMesh *dm, ParticleSystem *psys)
if (nodearray[*origindex]) {
/* prepend */
node->next = nodearray[*origindex];
- nodearray[*origindex]= node;
+ nodearray[*origindex] = node;
}
else
- nodearray[*origindex]= node;
+ nodearray[*origindex] = node;
}
}
@@ -633,8 +633,8 @@ static void hammersley_create(float *out, int n, int seed, float amount)
int k, kk;
rng = rng_new(31415926 + n + seed);
- offs[0]= rng_getDouble(rng) + (double)amount;
- offs[1]= rng_getDouble(rng) + (double)amount;
+ offs[0] = rng_getDouble(rng) + (double)amount;
+ offs[1] = rng_getDouble(rng) + (double)amount;
rng_free(rng);
for (k = 0; k < n; k++) {
@@ -643,8 +643,8 @@ static void hammersley_create(float *out, int n, int seed, float amount)
if (kk & 1) /* kk mod 2 = 1 */
t += p;
- out[2*k + 0]= fmod((double)k/(double)n + offs[0], 1.0);
- out[2*k + 1]= fmod(t + offs[1], 1.0);
+ out[2*k + 0] = fmod((double)k/(double)n + offs[0], 1.0);
+ out[2*k + 1] = fmod(t + offs[1], 1.0);
}
}
@@ -666,8 +666,8 @@ static void init_mv_jit(float *jit, int num, int seed2, float amount)
num2 = 2 * num;
for (i=0; i<num2; i+=2) {
- jit[i]= x + amount*rad1*(0.5f - rng_getFloat(rng));
- jit[i+1]= i/(2.0f*num) + amount*rad1*(0.5f - rng_getFloat(rng));
+ jit[i] = x + amount*rad1*(0.5f - rng_getFloat(rng));
+ jit[i+1] = i/(2.0f*num) + amount*rad1*(0.5f - rng_getFloat(rng));
jit[i]-= (float)floor(jit[i]);
jit[i+1]-= (float)floor(jit[i+1]);
@@ -698,21 +698,21 @@ static void psys_uv_to_w(float u, float v, int quad, float *w)
u= 1.0f-u;
}
- vert[0][0]= 0.0f; vert[0][1]= 0.0f; vert[0][2]= 0.0f;
- vert[1][0]= 1.0f; vert[1][1]= 0.0f; vert[1][2]= 0.0f;
- vert[2][0]= 1.0f; vert[2][1]= 1.0f; vert[2][2]= 0.0f;
+ vert[0][0] = 0.0f; vert[0][1] = 0.0f; vert[0][2] = 0.0f;
+ vert[1][0] = 1.0f; vert[1][1] = 0.0f; vert[1][2] = 0.0f;
+ vert[2][0] = 1.0f; vert[2][1] = 1.0f; vert[2][2] = 0.0f;
- co[0]= u;
- co[1]= v;
- co[2]= 0.0f;
+ co[0] = u;
+ co[1] = v;
+ co[2] = 0.0f;
if (quad) {
- vert[3][0]= 0.0f; vert[3][1]= 1.0f; vert[3][2]= 0.0f;
+ vert[3][0] = 0.0f; vert[3][1] = 1.0f; vert[3][2] = 0.0f;
interp_weights_poly_v3( w,vert, 4, co);
}
else {
interp_weights_poly_v3( w,vert, 3, co);
- w[3]= 0.0f;
+ w[3] = 0.0f;
}
}
@@ -1000,7 +1000,7 @@ static void distribute_invalid(Scene *scene, ParticleSystem *psys, int from)
if (psys->child && totchild) {
for (p=0,cpa=psys->child; p<totchild; p++,cpa++) {
- cpa->fuv[0]=cpa->fuv[1]=cpa->fuv[2]=cpa->fuv[3]= 0.0;
+ cpa->fuv[0]=cpa->fuv[1]=cpa->fuv[2]=cpa->fuv[3] = 0.0;
cpa->foffset= 0.0f;
cpa->parent=0;
cpa->pa[0]=cpa->pa[1]=cpa->pa[2]=cpa->pa[3]=0;
@@ -1011,7 +1011,7 @@ static void distribute_invalid(Scene *scene, ParticleSystem *psys, int from)
else {
PARTICLE_P;
LOOP_PARTICLES {
- pa->fuv[0]=pa->fuv[1]=pa->fuv[2]= pa->fuv[3]= 0.0;
+ pa->fuv[0] = pa->fuv[1] = pa->fuv[2] = pa->fuv[3] = 0.0;
pa->foffset= 0.0f;
pa->num= -1;
}
@@ -1113,7 +1113,7 @@ static int distribute_threads_init_data(ParticleThread *threads, Scene *scene, D
if (from == PART_FROM_VERT) {
MVert *mv= dm->getVertDataArray(dm, CD_MVERT);
- float (*orcodata)[3]= dm->getVertDataArray(dm, CD_ORCO);
+ float (*orcodata)[3] = dm->getVertDataArray(dm, CD_ORCO);
int totvert = dm->getNumVerts(dm);
tree=BLI_kdtree_new(totvert);
@@ -1245,9 +1245,9 @@ static int distribute_threads_init_data(ParticleThread *threads, Scene *scene, D
inv_totweight = (totweight > 0.f ? 1.f/totweight : 0.f);
/* Calculate cumulative weights */
- element_sum[0]= 0.0f;
+ element_sum[0] = 0.0f;
for (i=0; i<totelem; i++)
- element_sum[i+1]= element_sum[i] + element_weight[i] * inv_totweight;
+ element_sum[i+1] = element_sum[i] + element_weight[i] * inv_totweight;
/* Finally assign elements to particles */
if ((part->flag&PART_TRAND) || (part->simplify_flag&PART_SIMPLIFY_ENABLE)) {
@@ -1256,9 +1256,9 @@ static int distribute_threads_init_data(ParticleThread *threads, Scene *scene, D
for (p=0; p<totpart; p++) {
/* In theory element_sum[totelem] should be 1.0, but due to float errors this is not necessarily always true, so scale pos accordingly. */
pos= BLI_frand() * element_sum[totelem];
- particle_element[p]= distribute_binary_search(element_sum, totelem, pos);
- particle_element[p]= MIN2(totelem-1, particle_element[p]);
- jitter_offset[particle_element[p]]= pos;
+ particle_element[p] = distribute_binary_search(element_sum, totelem, pos);
+ particle_element[p] = MIN2(totelem-1, particle_element[p]);
+ jitter_offset[particle_element[p]] = pos;
}
}
else {
@@ -1272,13 +1272,13 @@ static int distribute_threads_init_data(ParticleThread *threads, Scene *scene, D
while ((i < totelem) && (pos > element_sum[i+1]))
i++;
- particle_element[p]= MIN2(totelem-1, i);
+ particle_element[p] = MIN2(totelem-1, i);
/* avoid zero weight face */
if (p == totpart-1 && element_weight[particle_element[p]] == 0.0f)
- particle_element[p]= particle_element[p-1];
+ particle_element[p] = particle_element[p-1];
- jitter_offset[particle_element[p]]= pos;
+ jitter_offset[particle_element[p]] = pos;
}
}
@@ -1622,9 +1622,9 @@ void psys_get_birth_coordinates(ParticleSimulationData *sim, ParticleData *pa, P
ParticleSystem *psys = sim->psys;
ParticleSettings *part;
ParticleTexture ptex;
- float fac, phasefac, nor[3]={0,0,0},loc[3],vel[3]={0.0,0.0,0.0},rot[4],q2[4];
- float r_vel[3],r_ave[3],r_rot[4],vec[3],p_vel[3]={0.0,0.0,0.0};
- float x_vec[3]={1.0,0.0,0.0}, utan[3]={0.0,1.0,0.0}, vtan[3]={0.0,0.0,1.0}, rot_vec[3]={0.0,0.0,0.0};
+ float fac, phasefac, nor[3] = {0,0,0},loc[3],vel[3] = {0.0,0.0,0.0},rot[4],q2[4];
+ float r_vel[3],r_ave[3],r_rot[4],vec[3],p_vel[3] = {0.0,0.0,0.0};
+ float x_vec[3] = {1.0,0.0,0.0}, utan[3] = {0.0,1.0,0.0}, vtan[3] = {0.0,0.0,1.0}, rot_vec[3] = {0.0,0.0,0.0};
float q_phase[4];
int p = pa - psys->particles;
part=psys->part;
@@ -2736,7 +2736,7 @@ static void basic_integrate(ParticleSimulationData *sim, int p, float dfra, floa
}
static void basic_rotate(ParticleSettings *part, ParticleData *pa, float dfra, float timestep)
{
- float rotfac, rot1[4], rot2[4]={1.0,0.0,0.0,0.0}, dtime=dfra*timestep, extrotfac;
+ float rotfac, rot1[4], rot2[4] = {1.0,0.0,0.0,0.0}, dtime=dfra*timestep, extrotfac;
if ((part->flag & PART_ROTATIONS) == 0) {
unit_qt(pa->state.rot);
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 88f3eb15610..c9b923cde32 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -249,9 +249,9 @@ static int ptcache_particle_write(int index, void *psys_v, void **data, int cfr
if (data[BPHYS_DATA_INDEX] && (cfra < pa->time - step || cfra > pa->dietime + step))
return 0;
- times[0]= pa->time;
- times[1]= pa->dietime;
- times[2]= pa->lifetime;
+ times[0] = pa->time;
+ times[1] = pa->dietime;
+ times[2] = pa->lifetime;
PTCACHE_DATA_FROM(data, BPHYS_DATA_INDEX, &index);
PTCACHE_DATA_FROM(data, BPHYS_DATA_LOCATION, pa->state.co);
diff --git a/source/blender/blenkernel/intern/sca.c b/source/blender/blenkernel/intern/sca.c
index 6c1fbbfa9a0..eb4e0d9c679 100644
--- a/source/blender/blenkernel/intern/sca.c
+++ b/source/blender/blenkernel/intern/sca.c
@@ -552,7 +552,7 @@ void set_sca_new_poins_ob(Object *ob)
if (sens->flag & SENS_NEW) {
for (a=0; a<sens->totlinks; a++) {
if (sens->links[a] && sens->links[a]->mynew)
- sens->links[a]= sens->links[a]->mynew;
+ sens->links[a] = sens->links[a]->mynew;
}
}
sens= sens->next;
@@ -563,7 +563,7 @@ void set_sca_new_poins_ob(Object *ob)
if (cont->flag & CONT_NEW) {
for (a=0; a<cont->totlinks; a++) {
if ( cont->links[a] && cont->links[a]->mynew)
- cont->links[a]= cont->links[a]->mynew;
+ cont->links[a] = cont->links[a]->mynew;
}
}
cont= cont->next;
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index f47c931e309..8fea83b202e 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -1598,7 +1598,7 @@ static void _scan_for_ext_spring_forces(Scene *scene, Object *ob, float timenow,
/*see if we have wind*/
if (do_effector) {
EffectedPoint epoint;
- float speed[3]={0.0f, 0.0f, 0.0f};
+ float speed[3] = {0.0f, 0.0f, 0.0f};
float pos[3];
mid_v3_v3v3(pos, sb->bpoint[bs->v1].pos, sb->bpoint[bs->v2].pos);
mid_v3_v3v3(vel, sb->bpoint[bs->v1].vec, sb->bpoint[bs->v2].vec);
@@ -1749,8 +1749,8 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3],
Object *ob= NULL;
GHash *hash;
GHashIterator *ihash;
- float nv1[3], nv2[3], nv3[3], nv4[3], edge1[3], edge2[3], d_nvect[3], dv1[3], ve[3], avel[3]={0.0, 0.0, 0.0},
- vv1[3], vv2[3], vv3[3], vv4[3], coledge[3]={0.0f, 0.0f, 0.0f}, mindistedge = 1000.0f,
+ float nv1[3], nv2[3], nv3[3], nv4[3], edge1[3], edge2[3], d_nvect[3], dv1[3], ve[3], avel[3] = {0.0, 0.0, 0.0},
+ vv1[3], vv2[3], vv3[3], vv4[3], coledge[3] = {0.0f, 0.0f, 0.0f}, mindistedge = 1000.0f,
outerforceaccu[3], innerforceaccu[3],
facedist, /* n_mag, */ /* UNUSED */ force_mag_norm, minx, miny, minz, maxx, maxy, maxz,
innerfacethickness = -0.5f, outerfacethickness = 0.2f,
@@ -2209,7 +2209,7 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo
bp = &sb->bpoint[ifirst];
for (bb=number_of_points_here; bb>0; bb--, bp++) {
/* clear forces accumulator */
- bp->force[0]= bp->force[1]= bp->force[2]= 0.0;
+ bp->force[0] = bp->force[1] = bp->force[2] = 0.0;
/* naive ball self collision */
/* needs to be done if goal snaps or not */
if (do_selfcollision) {
@@ -2304,8 +2304,8 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo
if (do_effector) {
EffectedPoint epoint;
float kd;
- float force[3]= {0.0f, 0.0f, 0.0f};
- float speed[3]= {0.0f, 0.0f, 0.0f};
+ float force[3] = {0.0f, 0.0f, 0.0f};
+ float speed[3] = {0.0f, 0.0f, 0.0f};
float eval_sb_fric_force_scale = sb_fric_force_scale(ob); /* just for calling function once */
pd_point_from_soft(scene, bp->pos, bp->vec, sb->bpoint-bp, &epoint);
pdDoEffectors(do_effector, NULL, sb->effector_weights, &epoint, force, speed);
@@ -2557,7 +2557,7 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
for (a=sb->totpoint, bp= sb->bpoint; a>0; a--, bp++) {
/* clear forces accumulator */
- bp->force[0]= bp->force[1]= bp->force[2]= 0.0;
+ bp->force[0] = bp->force[1] = bp->force[2] = 0.0;
if (nl_flags & NLF_BUILD) {
//int ia =3*(sb->totpoint-a);
//int op =3*sb->totpoint;
@@ -2712,8 +2712,8 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
/* particle field & vortex */
if (do_effector) {
EffectedPoint epoint;
- float force[3]= {0.0f, 0.0f, 0.0f};
- float speed[3]= {0.0f, 0.0f, 0.0f};
+ float force[3] = {0.0f, 0.0f, 0.0f};
+ float speed[3] = {0.0f, 0.0f, 0.0f};
float eval_sb_fric_force_scale = sb_fric_force_scale(ob); /* just for calling function once */
pd_point_from_soft(scene, bp->pos, bp->vec, sb->bpoint-bp, &epoint);
pdDoEffectors(do_effector, NULL, sb->effector_weights, &epoint, force, speed);
@@ -2905,7 +2905,7 @@ static void softbody_apply_forces(Object *ob, float forcetime, int mode, float *
/* or heun ~ 2nd order runge-kutta steps, mode 1, 2 */
SoftBody *sb= ob->soft; /* is supposed to be there */
BodyPoint *bp;
- float dx[3]={0}, dv[3], aabbmin[3], aabbmax[3], cm[3]={0.0f, 0.0f, 0.0f};
+ float dx[3] = {0}, dv[3], aabbmin[3], aabbmax[3], cm[3] = {0.0f, 0.0f, 0.0f};
float timeovermass/*, freezeloc=0.00001f, freezeforce=0.00000000001f*/;
float maxerrpos= 0.0f, maxerrvel = 0.0f;
int a, fuzzy=0;
@@ -3865,7 +3865,7 @@ static void softbody_reset(Object *ob, SoftBody *sb, float (*vertexCos)[3], int
copy_v3_v3(bp->origS, bp->pos);
copy_v3_v3(bp->origE, bp->pos);
copy_v3_v3(bp->origT, bp->pos);
- bp->vec[0]= bp->vec[1]= bp->vec[2]= 0.0f;
+ bp->vec[0] = bp->vec[1] = bp->vec[2] = 0.0f;
/* the bp->prev*'s are for rolling back from a canceled try to propagate in time
* adaptive step size algo in a nutshell: