algorithm - Separating Axis Theorem - Containment and the minimum translation vector -


my code calculate minimum translation vector using separating axis theorem works well, except when 1 of polygons contained polygon. have scoured internet solution problem , seems ignore ( http://www.codezealot.org/archives/55#sat-contain talks this, doesn't give full solution...)

the pictures below screenshot program illustrating problem. translucent blue triangle position of rectangle before mtv applied, , other triangle mtv applied.

mtv containment problem - screenshot

it seems me link shared give solution this. in mtv calculation, have test complete containment in projection , change calculations accordingly. (the pseudocode in reference figure 9 on page.) perhaps if post code, can comment on why isn't working.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -