Page 1 of 1

btDispatcher::dispatchAllCollisionPairs

Posted: Tue Sep 28, 2010 11:52 pm
by paul.dubois
Is there a subtle reason btDispatcher::dispatchAllCollisionPairs() takes a btDispatcher* parameter?

Code: Select all

void btCollisionDispatcher::dispatchAllCollisionPairs(
    btOverlappingPairCache* pairCache,
    const btDispatcherInfo& dispatchInfo,
    btDispatcher* dispatcher)
{
    btCollisionPairCallback collisionCallback(dispatchInfo, this);
    pairCache->processAllOverlappingPairs(&collisionCallback, dispatcher);
}
"this" is used to create new algorithms; and "dispatcher" is used by the pair cache to free algorithms. So as far as I can tell, it would be an error if "this != dispatcher".

Re: btDispatcher::dispatchAllCollisionPairs

Posted: Wed Sep 29, 2010 12:30 am
by Erwin Coumans
Good find, I don't recall any reason so it probably slipped in by accident during some refactoring a few years ago:

http://code.google.com/p/bullet/source/ ... spatcher.h
http://code.google.com/p/bullet/source/ ... atcher.cpp

Thanks,
Erwin

Re: btDispatcher::dispatchAllCollisionPairs

Posted: Wed Dec 03, 2014 6:23 pm
by Slight0
I know this is really old, but this discrepancy still hasn't been fixed. Why's that?