Hey there.
I'm a bit curious about something - why does Box2D not have any shape-shape testing API, or if it does, how do I access it?
See, I ran into this issue where I need to, basically, test if any static objects are within a polygon. It turned out to be surprisingly difficult, I essentially had to copy the entire Contact class, make changes so that I can make a dynamic one, and then use the b2Collide* functions to do tests.
Box2D should really have a built-in version of doing this, like an overload of the b2Contact constructor that accepts two fixtures and tests them as if it was a contact that the world created.
EDIT: I should clarify that I'm talking about shapes that aren't connected to a body or a fixture. For instance, if you wanted to see if anyone in the map is inside of an irregular shape without making a temporary body and all that stuff. It should definitely be possible, and it sounds like something that would be really wanted in this.
-P
I'm a bit curious about something - why does Box2D not have any shape-shape testing API, or if it does, how do I access it?
See, I ran into this issue where I need to, basically, test if any static objects are within a polygon. It turned out to be surprisingly difficult, I essentially had to copy the entire Contact class, make changes so that I can make a dynamic one, and then use the b2Collide* functions to do tests.
Box2D should really have a built-in version of doing this, like an overload of the b2Contact constructor that accepts two fixtures and tests them as if it was a contact that the world created.
EDIT: I should clarify that I'm talking about shapes that aren't connected to a body or a fixture. For instance, if you wanted to see if anyone in the map is inside of an irregular shape without making a temporary body and all that stuff. It should definitely be possible, and it sounds like something that would be really wanted in this.
-P