SAT - Same Plane Triangle

Started by
11 comments, last by Dirk Gregorius 7 years, 9 months ago

Only two *supporting edges* (a.k.a a face on the MK sum) need to be tested for separation (and the faces obviously).

This can be done with brute force checking: Build a plane from the first edge in the direction of the cross edges product (pointing to the second poly) and make sure all the first poly vertices are behind this plane. Do the same for the second edge and poly but negating the normal direction for acount for the support. Finally, for the separation get a support from the second poly in the opposite normal direction. The distance between the support and the first plane is your (correct) separation.

Or you can be smart and use gauss maps as pointed out by Dirk to prune edge pairs. Use Game Physics Pearls to visualize more examples on this.

Hope this helps and sorry for extending the discussion more than needed.

Advertisement

@Dirk, thank you for the resource link! You are freaking awesome!

Thanks, I am glad you like it. If you are interested in these kind of presentations (what your name suggests) you kind find a lot similar presentations on the GDC Physics Tutorial website hosted on Box2D: http://box2d.org/downloads/

Similarly, the GDC Math tutorial has lots of presentations collected over the years as well:

http://www.essentialmath.com/tutorial.htm

This topic is closed to new replies.

Advertisement