btDispatcher::dispatchAllCollisionPairs

Post Reply
paul.dubois
Posts: 10
Joined: Thu May 20, 2010 10:45 pm

btDispatcher::dispatchAllCollisionPairs

Post 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".
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: btDispatcher::dispatchAllCollisionPairs

Post 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
Slight0
Posts: 11
Joined: Wed Nov 19, 2014 12:42 am

Re: btDispatcher::dispatchAllCollisionPairs

Post by Slight0 »

I know this is really old, but this discrepancy still hasn't been fixed. Why's that?
Post Reply