← Back to team overview

yade-dev team mailing list archive

[yade dev] skip non dynamic bodies in a loop over interactions

 

Hi there,

How would you do to skip non dynamic bodies in a loop over interactions?

I tried

FOREACH(const shared_ptr<Interaction>& I, *scene->interactions){
            if(  !(Body::byId(I->getId1())->isDynamic) ||
!(Body::byId(I->getId1())->isDynamic)  ) continue;
}

but, obviously, I missed something...

Cheers

  Luc

Follow ups