1. Anders Ruud
  2. love
  3. Issues


Issue #453 resolved

BOX2D function: DecomposeConvexAndAddTo() (Splits a single figure on a few)

Antonio Moder
created an issue

Splits a single figure on a few ( BOX2D function DecomposeConvexAndAddTo() ): http://code.google.com/p/box2d/source/browse/#svn%2Ftrunk%2FContributions%2FUtilities%2FConvexDecomposition

Example (http://www.gamedev.ru/code/forum/?id=92179) The third picture - this a bug fixed in this function.: http://www.gamedev.ru/files/images/convex_bug.gif

I want this function in LOVE !!! Sadly, I can not do it.

Comments (12)

  1. Matthias Richter

    Decomposition into optimal convex sub-shapes is a very hard problem and definitely out of the scope of what love offers. love.math.triangulate offers you a tool to at least get the decomposition into triangles, which you can either use as Alex mentioned or try to fuse into bigger convex shapes as done in HardonCollider. The code you linked seems to go in the same direction.

  2. Antonio Moder reporter

    vrld, this method (love.math.triangulate) is correct. But if add this new (DecomposeConvexAndAddTo()) feature in "LOVE" a very complicated case, you can "resolve" this topic.

  3. Log in to comment