The manual, reads:
The broadphase adds and removes overlapping pairs from a pair cache. The developer can choose the type of pair cache.
A collision dispatcher iterates over each pair, searches for a matching collision algorithm based on the types of objects involved and executes the collision algorithm computing contact points.So, get all the manifolds and loop on them. I was pretty sure the manual included a code snippet in the past but I'm unable to find it myself so for your convenience, the code will be like
Code:
const int manifoldCount(dispatcher.getNumManifolds());
for(int loop = 0; loop < manifoldCount; loop++) {
const btPersistentManifold *mf = dispatcher.getManifoldByIndexInternal(loop);
const void *obja = mf->getBody0();
const void *objb = mf->getBody1();
if(obja == object || objb == object) {
// This manifold deals with the btRigidBody we are looking for.
// A manifold is a RB-RB pair containing a list of potential (predicted) contact points.
const unsigned int numContacts(mf->getNumContacts());
for(int check = 0; check < numContacts; check++) {
const btManifoldPoint &pt(mf->getContactPoint(check));
// do something here, in case you're interested.
}
}
}