Breaking a concave polygon into convex ones.

Posted by Bart van Heukelom on Stack Overflow See other posts from Stack Overflow or by Bart van Heukelom
Published on 2010-03-16T20:23:19Z Indexed on 2010/03/16 20:31 UTC
Read the original article Hit count: 518

I'm using a game physics library (Box2D) which only supports convex polygon shapes. However, I'd like the level builder to be able to just specify concave polygons without having to worry about that.

So, how can I automatically break apart a concave polygon into convex ones (or even all triangles). Speed would be cool, but ease of implementation is more important. The breaking apart will only be done on game initialization.

(My language is Flash/ActionScript 3, but that shouldn't matter)

© Stack Overflow or respective owner

Related posts about polygon

Related posts about game-development