diff options
author | Joseph Eagar <joeedh@gmail.com> | 2011-04-15 05:19:13 +0400 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2011-04-15 05:19:13 +0400 |
commit | c98148a963d37fc2f25e125afeb4cf21df6fbf14 (patch) | |
tree | 691a051e27f08e35bf09d35b6fb9c88e4c37b8d2 /source/blender/modifiers/intern/MOD_wave.c | |
parent | 0bba684d08952d0be822f3906ffb2a03b2674cc2 (diff) | |
parent | fa63c297753636c149fbb1a3877d9b3d93601357 (diff) |
=bmesh= merge from trunk at r36153
Diffstat (limited to 'source/blender/modifiers/intern/MOD_wave.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_wave.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/modifiers/intern/MOD_wave.c b/source/blender/modifiers/intern/MOD_wave.c index 42b1369e8ca..e3ee612374a 100644 --- a/source/blender/modifiers/intern/MOD_wave.c +++ b/source/blender/modifiers/intern/MOD_wave.c @@ -286,7 +286,7 @@ static void waveModifier_do(WaveModifierData *md, if(wmd->damp == 0) wmd->damp = 10.0f; - if(wmd->lifetime != 0.0) { + if(wmd->lifetime != 0.0f) { float x = ctime - wmd->timeoffs; if(x > wmd->lifetime) { @@ -294,7 +294,7 @@ static void waveModifier_do(WaveModifierData *md, if(lifefac > wmd->damp) lifefac = 0.0; else lifefac = - (float)(wmd->height * (1.0 - sqrt(lifefac / wmd->damp))); + (float)(wmd->height * (1.0f - sqrtf(lifefac / wmd->damp))); } } @@ -304,9 +304,9 @@ static void waveModifier_do(WaveModifierData *md, wavemod_get_texture_coords(wmd, ob, dm, vertexCos, tex_co, numVerts); } - if(lifefac != 0.0) { + if(lifefac != 0.0f) { /* avoid divide by zero checks within the loop */ - float falloff_inv= wmd->falloff ? 1.0f / wmd->falloff : 1.0; + float falloff_inv= wmd->falloff ? 1.0f / wmd->falloff : 1.0f; int i; for(i = 0; i < numVerts; i++) { @@ -364,14 +364,14 @@ static void waveModifier_do(WaveModifierData *md, amplit -= (ctime - wmd->timeoffs) * wmd->speed; if(wmd->flag & MOD_WAVE_CYCL) { - amplit = (float)fmod(amplit - wmd->width, 2.0 * wmd->width) + amplit = (float)fmodf(amplit - wmd->width, 2.0f * wmd->width) + wmd->width; } /* GAUSSIAN */ if(amplit > -wmd->width && amplit < wmd->width) { amplit = amplit * wmd->narrow; - amplit = (float)(1.0 / exp(amplit * amplit) - minfac); + amplit = (float)(1.0f / expf(amplit * amplit) - minfac); /*apply texture*/ if(wmd->texture) @@ -457,18 +457,18 @@ ModifierTypeInfo modifierType_Wave = { | eModifierTypeFlag_SupportsEditmode, /* copyData */ copyData, /* deformVerts */ deformVerts, - /* deformMatrices */ 0, + /* deformMatrices */ NULL, /* deformVertsEM */ deformVertsEM, - /* deformMatricesEM */ 0, - /* applyModifier */ 0, - /* applyModifierEM */ 0, + /* deformMatricesEM */ NULL, + /* applyModifier */ NULL, + /* applyModifierEM */ NULL, /* initData */ initData, /* requiredDataMask */ requiredDataMask, - /* freeData */ 0, - /* isDisabled */ 0, + /* freeData */ NULL, + /* isDisabled */ NULL, /* updateDepgraph */ updateDepgraph, /* dependsOnTime */ dependsOnTime, - /* dependsOnNormals */ 0, + /* dependsOnNormals */ NULL, /* foreachObjectLink */ foreachObjectLink, /* foreachIDLink */ foreachIDLink, }; |