There are a few points now in the API where a unary function mapping from shapes to booleans is used/implied/would be useful. Such as
* Raycasting callback
* IsTouching from this patch
* b2World.Query
I was thinking we should arrange that these are all under the same system of overloaded function calls, including a few of:
* (No extra args) - All shapes selected.
* b2FilterData - Shapes with a corresponding filter data
* b2Shape - Shapes colliding with the given shape
* b2Body - shapes inside the given body
* C-style callback, i.e. a function pointer plus void* userData argument
* C++-style callback i.e. a object with a virtual method.
* Template style call back, i.e. an object with an () operator, and a templated argument.
* Box2D style callback i.e. a globally registered callback function, plus possibly a userData argument.
Basically, I just want to give everyone the ability to pass b2FilterData's to raycasting, without promotimg them to "first class" box2d citizens. The rest is just sugar.
* Raycasting callback
* IsTouching from this patch
* b2World.Query
I was thinking we should arrange that these are all under the same system of overloaded function calls, including a few of:
* (No extra args) - All shapes selected.
* b2FilterData - Shapes with a corresponding filter data
* b2Shape - Shapes colliding with the given shape
* b2Body - shapes inside the given body
* C-style callback, i.e. a function pointer plus void* userData argument
* C++-style callback i.e. a object with a virtual method.
* Template style call back, i.e. an object with an () operator, and a templated argument.
* Box2D style callback i.e. a globally registered callback function, plus possibly a userData argument.
Basically, I just want to give everyone the ability to pass b2FilterData's to raycasting, without promotimg them to "first class" box2d citizens. The rest is just sugar.