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:
Diffstat (limited to 'source/blender/blenkernel/intern/effect.c')
-rw-r--r--source/blender/blenkernel/intern/effect.c50
1 files changed, 5 insertions, 45 deletions
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index b1a990ce193..b26be057879 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -1418,6 +1418,11 @@ void build_particle_system(Object *ob)
/* ************* WAVE **************** */
+void init_wave_deform(WaveEff *wav) {
+ wav->minfac= (float)(1.0/exp(wav->width*wav->narrow*wav->width*wav->narrow));
+ if(wav->damp==0) wav->damp= 10.0f;
+}
+
void calc_wave_deform(WaveEff *wav, float ctime, float *co)
{
/* co is in local coords */
@@ -1467,51 +1472,6 @@ void calc_wave_deform(WaveEff *wav, float ctime, float *co)
}
}
-/* return 1 if deformed
- Note: it works on mvert now, so assumes to be callied in modifier stack \
-*/
-int object_wave(Object *ob)
-{
- WaveEff *wav;
- Mesh *me;
- MVert *mvert;
- float ctime;
- int a;
-
- /* is there a wave */
- wav= ob->effect.first;
- while(wav) {
- if(wav->type==EFF_WAVE) break;
- wav= wav->next;
- }
- if(wav==NULL) return 0;
-
- if(ob->type==OB_MESH) {
-
- ctime= bsystem_time(ob, 0, (float)G.scene->r.cfra, 0.0);
-
- me= ob->data;
-
- wav= ob->effect.first;
- while(wav) {
- if(wav->type==EFF_WAVE) {
-
- /* precalculate */
- wav->minfac= (float)(1.0/exp(wav->width*wav->narrow*wav->width*wav->narrow));
- if(wav->damp==0) wav->damp= 10.0f;
-
- mvert= me->mvert;
-
- for(a=0; a<me->totvert; a++, mvert++) {
- calc_wave_deform(wav, ctime, mvert->co);
- }
- }
- wav= wav->next;
- }
- }
- return 1;
-}
-
int SoftBodyDetectCollision(float opco[3], float npco[3], float colco[3],
float facenormal[3], float *damp, float force[3], int mode,
float cur_time, unsigned int par_layer,struct Object *vertexowner)