vanderlin/ofxBox2d — Issue #24: Find the vector ID of a shape during a collision
Author: LimeJuice
Created: 2012-03-07 23:40:48+00:00
State: open

Hi,

I am playing with collisions using the ContactListenerExample.
I wonder if it is possible to get the vector ID ( by vector ID, I mean for example: " circles[0] " 0 would be the ID of this circle. I am not sure to use the right term though ) to find out which shape have been hit.

here the code in the example:
if(e.a->GetType() == b2Shape::e_circle && e.b->GetType() == b2Shape::e_circle) {

}

is there any e.b->GetID() that would gave me the item number into the vector circle ?

Thanks very much.