diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-04-27 22:26:20 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-04-27 22:26:20 +0400 |
commit | 57c1fbe5579b786ee24e58ad1d67ca5ad0625f76 (patch) | |
tree | 6c938654ad84f0f126dc925d9a5b625340be0ef4 /source/blender/src/drawobject.c | |
parent | 9ea254ca345585ff6aae0286fa301795dc65ebf2 (diff) |
remove old particle system.
also removed quat, dquat, and sumohandle from the Object struct since they aren't used anywhere.
Diffstat (limited to 'source/blender/src/drawobject.c')
-rw-r--r-- | source/blender/src/drawobject.c | 148 |
1 files changed, 0 insertions, 148 deletions
diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c index b7b2bdf195e..808320bb9de 100644 --- a/source/blender/src/drawobject.c +++ b/source/blender/src/drawobject.c @@ -2866,143 +2866,6 @@ static int drawDispList(Base *base, int dt) return retval; } -/* ******************************** */ - - -static void draw_particle_system(Base *base, PartEff *paf) -{ - Object *ob= base->object; - Particle *pa; - float ptime, ctime, vec[3], vec1[3], mat[4][4]; - int a, totpart; - - pa= paf->keys; - // FSPARTICLE always rebuild fluid particle system upon change... - if( (pa==NULL) - || ( (ob->fluidsimFlag & OB_FLUIDSIM_ENABLE) && (ob->fluidsimSettings) && (ob->fluidsimSettings->type == OB_FLUIDSIM_PARTICLE)) - ) { - build_particle_system(ob); - pa= paf->keys; - if(pa==NULL) return; - } - - myloadmatrix(G.vd->viewmat); - /* flag abuse... but I need working code too now. This feature doesnt work for per frame animated objects */ - if( (base->flag & OB_FROMDUPLI) && (ob->flag & OB_FROMGROUP) ) { - Mat4MulMat4(mat, paf->imat, ob->obmat); - mymultmatrix(mat); - } - - if(ob->ipoflag & OB_OFFS_PARTICLE) ptime= give_timeoffset(ob); - else ptime= 0.0; - ctime= bsystem_time(ob, (float)(G.scene->r.cfra), ptime); - - glPointSize(1.0); - - if(paf->stype==PAF_VECT) glBegin(GL_LINES); - else glBegin(GL_POINTS); - - totpart= (paf->disp*paf->totpart)/100; - for(a=0; a<totpart; a++, pa+=paf->totkey) { - - if(ctime > pa->time) { - if(ctime < pa->time+pa->lifetime) { - - if(paf->stype==PAF_VECT) { - where_is_particle(paf, pa, ctime, vec); - where_is_particle(paf, pa, ctime+1.0, vec1); - - glVertex3fv(vec); - glVertex3fv(vec1); - } - else { - where_is_particle(paf, pa, ctime, vec); - - glVertex3fv(vec); - } - } - } - } - glEnd(); - - myloadmatrix(G.vd->viewmat); - mymultmatrix(ob->obmat); // bring back local matrix for dtx -} - -static void draw_static_particle_system(Object *ob, PartEff *paf, int dt) -{ - Particle *pa; - float ctime, mtime, vec[3], veco[3]; - int a, use_norm=0, totpart; - - pa= paf->keys; - // FSPARTICLE always rebuild upon change... - if( (pa==NULL) - || ( (ob->fluidsimFlag & OB_FLUIDSIM_ENABLE) && (ob->fluidsimSettings) && (ob->fluidsimSettings->type == OB_FLUIDSIM_PARTICLE)) - ) { - build_particle_system(ob); - pa= paf->keys; - if(pa==NULL) return; - } - - if(paf->stype==PAF_VECT) { - if(dt>OB_WIRE) { - - /* shaded/texture mode: we still draw solid, so have to set materials */ - if(dt>OB_SOLID) init_gl_materials(ob, 0); - - glEnable(GL_LIGHTING); - set_gl_material(paf->omat); - use_norm= 1; - } - } - else { - glPointSize(1.0); - glBegin(GL_POINTS); - } - - totpart= (paf->disp*paf->totpart)/100; - for(a=0; a<totpart; a++, pa+=paf->totkey) { - - if(paf->stype==PAF_VECT) { - - glBegin(GL_LINE_STRIP); - where_is_particle(paf, pa, pa->time, veco); - - mtime= pa->time+pa->lifetime+paf->staticstep; - for(ctime= pa->time+paf->staticstep; ctime<mtime; ctime+=paf->staticstep) { - - where_is_particle(paf, pa, ctime, vec); - - if(use_norm) { - float no[3]; - VECSUB(no, vec, veco); - glNormal3fv(no); - } - glVertex3fv(veco); - VECCOPY(veco, vec); - } - - glVertex3fv(veco); - glEnd(); - } - else { - mtime= pa->time+pa->lifetime+paf->staticstep-1; - for(ctime= pa->time; ctime<mtime; ctime+=paf->staticstep) { - where_is_particle(paf, pa, ctime, vec); - glVertex3fv(vec); - } - } - } - if(paf->stype==PAF_VECT) { - glDisable(GL_LIGHTING); - } - else { - glEnd(); - } - -} - /* unified drawing of all new particle systems draw types except dupli ob & group */ /* mostly tries to use vertex arrays for speed */ @@ -4983,17 +4846,6 @@ void draw_object(Base *base, int flag) if (!(base->flag&OB_RADIO)) { empty_object= draw_mesh_object(base, dt, flag); if(flag!=DRAW_CONSTCOLOR) dtx &= ~OB_DRAWWIRE; // mesh draws wire itself - - if(G.obedit!=ob && warning_recursive==0) { - PartEff *paf = give_parteff(ob); - - if(paf) { - if(col || (ob->flag & SELECT)) cpack(0xFFFFFF); /* for visibility, also while wpaint */ - if(paf->flag & PAF_STATIC) draw_static_particle_system(ob, paf, dt); - else if((flag & DRAW_PICKING) == 0) draw_particle_system(base, paf); // selection errors happen to easy - if(col) cpack(col); - } - } } break; |