There are too many contacts which are constantly being created and deleted for them to be treated the same as other objects, so the plugin uses a current contact system (a bit like the current bitmap in DBPro). All the contact commands work on the current contact.
b2GetContact just makes the next contact in a list the current contact. If there are no more contacts it returns zero, otherwise it returns one. There is no contact ID as such, just the current contact.
I tried to explain this in the help files for b2GetContact.
A body in box2d is made up of individual fixtures which define the physical shape. From a contact, you can get the two fixtures which collided with b2GetContactFixtureA() and b2GetContactFixtureB(). To get the bodies those fixtures belong to you can use b2GetFixtureBody() on each of them.
To get the "force" with which a collision occurs you can compare the velocities of the two bodies involved. Depending on how you want it to function you could take into account the masses of the bodies.
Quote: "Can't I just call those functions on the ball and see if it's made contact with the bumpers? It seems like that would cut down on loops, especially when I have more than 3 objects to check."
Yes, that's perfectly fine. I did it that way because it makes sense logically that if anything touches a bumper it should go off. Although in this case the only thing that moves is the ball, people might have wanted to extend the code in which case the bumpers would continue to function.
[b]
