Skip to main content
GameDev.net gamedev.net
🔒 Locked

Plane - AABB intersection

Started by Pudelmuetze Mar 12, 2009 at 11:26 AM 1 replies 12.2k views
Original Post
Pudelmuetze
Pudelmuetze
Hi! I already looked at http://www.realtimerendering.com/intersections.html for a Plane - AABB intersection test, but I can't access any of the listed ones. My check would simply be to test if the eight vertices of the box lie on the same side of the plane. Does anyone know a better test? Best regards, Pudelmuetze
Zakwayda
Zakwayda
Quote:
Does anyone know a better test?
Yes, the 'separating axis test' (SAT).

In the case of an axis-aligned box and a plane, the SAT reduces to projecting the box onto the plane normal and comparing the projection to the plane distance (you'll often see this test expressed in terms of the box's 'n-vertex' and 'p-vertex').

The method is explained here, in the section titled 'Geometric Approach - Testing Boxes II'.
Pudelmuetze
Pudelmuetze
Thanks, it seems to work. :)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.