void PinMod::ModifyObject(TimeValue t, ModContext &mc, ObjectState *os, INode *node) { ParticleObject *obj = GetParticleInterface(os->obj); if (obj) { force.obj=(PinObject*)GetWSMObject(t); force.node=nodeRef; force.tmValid.SetEmpty(); force.fValid.SetEmpty(); force.dt=GetTicksPerFrame(); force.dtsq=force.dt*force.dt; obj->ApplyForceField(&force); //ok } }
void WindMod::ModifyObject( TimeValue t, ModContext &mc, ObjectState *os, INode *node) { ParticleObject *obj = GetParticleInterface(os->obj); if (obj) { force.obj = (WindObject*)GetWSMObject(t); force.node = nodeRef; force.tmValid.SetEmpty(); force.fValid.SetEmpty(); if (force.obj != NULL) force.obj->pblock2->GetValue(PB_TYPE,t,force.type,FOREVER); obj->ApplyForceField(&force); } }
void PBombMod::ModifyObject( TimeValue t, ModContext &mc, ObjectState *os, INode *node) { ParticleObject *obj = GetParticleInterface(os->obj); if (obj) { /* if (!mc.localdata) { mc.localdata=seed; seed+=5;} */ force.obj = (PBombObject*)GetWSMObject(t); force.node = nodeRef; force.tmValid.SetEmpty(); force.fValid.SetEmpty(); force.dt=GetTicksPerFrame(); force.dtsq=force.dt*force.dt; obj->ApplyForceField(&force); } }