[Contributions] Controllers

Hi there,

I've been using Box2D for a while on the trunk, and realized only yesterday that there was a new repository..
So I updated to the new repository, only to see that the controllers has been removed from the core and moved to the Contribution folder..

I tried to include the required files in the box2D lib anyway, but it seems that the removal was quite brutal, as neither the bodies nor the world has a pointer member to controllers (or controllerEdge). Which means the controller behavior is simply not usable.
I also figured out that there where still some struct and class forward declarations regarding controllers in b2Body.h and b2World.h.

To me it seems that this controller removal is still a work-in-progress, but here is my questions :

Is the use of controllers supposed to be completly outside Box2D in the future ? Meaning that if you want to use it you have to add it yourself into the code of the step function ? (scarry! 😮 )

Or is it supposed to be supported somehow ? ( maybe by having only the abstract controller declaration in the core and the different implementations in the contribution folder.. )

--

I have another question regarding this contribution folder, as I fixed the helpers for convex polygon decomposition witch were not compiling with the latest svn ( revision 22 of the new google repository ). Should I provide a patch or something ?
When I say fixed I mean *almost* fixed as I used 0 instead of b2_toiSlope which is a box2d constant that must have existed at one point.. But it is working fine for me.
But this is an entirely other topic and I will create a new one if someone is interested.


Anyway, thanks for this awesome lib !!
cheers,
chris
Controllers should probably not be integrated in to Box2D anymore. I don't plan to implement them in Box2D.

If you look at the old implementation, the b2World::Step would just call the controllers at the beginning to apply some forces. You can easily keep your own list of controllers and apply them before calling b2World::Step.

I put the controllers in the contributions folder so you can make some use of the algorithms if you like. They are not intended to be hooked into Box2D as before.
Alright!

I actually already managed to use them like I wanted to, their general management looked a bit tricky but for a specific implementation it is quite simple.
So I understand that you don't want to integrate them anymore in order to simplify the API..

Be carefull with the remaining class forward declaration I mentioned though !


Regarding my other question about the convex decomposition, what should I do with the fixed code ?

Original thread: https://box2d.org/forum/viewtopic.php?t=3803