måndag 27 februari 2017

Concave shapes

One big problem with the GJK algorithm is that it only works for convex shapes. If something is inside the cavity of a concave shape, it will detect an intersection because it is inside the convex hull of the shape.

 

It will also show the closest distance between the shapes as the closest distance to the convex hull.


Since many interesting shapes in applications of collision detection are concave, this is quite limiting. Thankfully, Felix has developed an algorithm which splits a concave shape into convex parts. 



Don't worry about the fact that the lines and the overlapping is a bit chaotic right now. Adapting our GJK algorithm for our new group of convex shapes will be our next step.

Inga kommentarer:

Skicka en kommentar