← Back to team overview

yade-dev team mailing list archive

Re: contact logic (again)

 



Remaining problem: who deletes interaction that was ever only potential and now there is no AABB overlap anymore? It would have to keep track of when was the interaction seen last (something like Interaction::cycle). I propose long Interaction::lastSeen for iteration number. All interactions that are isNew && !isReal && lastSeen<currentIteration can be deleted safely. Whould that be OK? Currently, PersistentSAPCollider sets isReal=false at the beginning of the loop.


Mmmh... Is there really a problem here? What is the difference with 1.b) above? You can let the collider delete those interactions, disregarding the "lastseen" iteration.

Remember the interractions are deleted in two places. If your deleting process does not handle the isNew / !isReal, the older process does that :

else if(!overlap && found && (haveDistantTransient ? !interaction->isReal : true) ){ //LOG_DEBUG("Erasing interaction #"<<id1<<"=#"<<id2<<" (isReal="<<interaction->isReal<<")");
       transientInteractions->erase(body_id_t(id1),body_id_t(id2));


Additional note :
I wonder if isNew should not be set false when !isReal (I thought it was the case already), so that an interaction couldn't be in the (!isReal && !isNew) for more than 1 iteration. It would avoid using junk data from a previous contact in touch/detach/touch scenarii.

Bruno



--

_______________
Chareyre Bruno
Maitre de conference

Grenoble INP
Laboratoire 3SR - bureau E145
BP 53 - 38041, Grenoble cedex 9 - France
Tél : 33 4 56 52 86 21
Fax : 33 4 76 82 70 43
________________




Follow ups

References