I need to be able to accurately detect and react to collision with any bitmap terrain, and the best method seems to be to use Marching Squares to generate a polygon mesh, which I can then use with a physics engine such as Bullet, which will be much better than anything I can write by myself.
The problem is while I've seen plenty of people mention using Marching Squares to do this, I can't find anything that explains how! I've not even been able to find any particularly great explanations/tutorials on the Marching Squares algorithm itself, though I think I pretty much understand it from what I have found. What I can't figure out is how to create polygons from the lines that MS will give me.
I have found this, which is pretty much exactly what I want to make, but I'll either need to find a similar physics library for C++, or write the mesh generation myself.
http://deltaluca.me.uk/docnew/swf/DestructableTerrain.html
I'd rather not simply look through the source for the physics engine to see how it works, so hopefully somewhere knows of a place that explains the process a bit better! Anything in C++ would be preferred, but other languages should be fine if the process is explained well.