New question #669986 on Yade:
https://answers.launchpad.net/yade/+question/669986

Good evening,
I was wondering, how are interactions calculated?
I dug into the trunk code and found this in InteractionContainer.cpp


void InteractionContainer::postLoad__calledFromScene(const 
shared_ptr<BodyContainer>& bb){
        bodies=&bb->body;
        clear();
        FOREACH(const shared_ptr<Interaction>& I, interaction){ 
                Body::id_t id1=I->getId1(), id2=I->getId2();
                if (!(*bodies)[id1] || !(*bodies)[id2]) {
                        return;
                } else {
                        insert(I);
                }
        }
        interaction.clear();
}



But i dont really understand this line          if (!(*bodies)[id1] || 
!(*bodies)[id2]) {

and i am not sure it is even relevant
Thanks in advance
John




-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to