# How to know if a triangle intersects an AABB.

This topic is 5423 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello, I have the need to know if a triangle intersecs an AABB. I have thought about doing an AABB/segment for each side of the triangle, is this a good option? Is there any tutorial with math explained to achieve this?. Thanks in advance, HexDump.

##### Share on other sites
Quote:
 Original post by HexDumpHello,I have the need to know if a triangle intersecs an AABB. I have thought about doing an AABB/segment for each side of the triangle, is this a good option? Is there any tutorial with math explained to achieve this?.Thanks in advance,HexDump.

Use the method of separating axes to decide this. My web site has a document on this,
• Quote:
 Original post by Dave EberlyUse the method of separating axes to decide this. My web site has a document on this, Separating Axes

Well, so much for trying to use HTML here. Try www.magic-software.com, documentation page, MethodOfSeparatingAxes.pdf

[Edited by - Sneftel on September 13, 2004 11:06:16 PM]

##### Share on other sites
HexDump, the way I would check to see if a triangle is intersecting an Axis-Aligned Bounding Box, would be to convert one of the sides of the AABB to a plane, and then check each vertex against that plane, to see in which side it would fall.

If all vertices fall on the outside of the plane, then the triangle is on the outside of the AABB, and no further calculations are required, but if at least 1 of the vertices falls on the inside, then you need to check it against the other 5 faces, and try to determine if it really falls inside the AABB volume area.

This process can be further improved upon, depending on exactly what you want.

##### Share on other sites
Next time try using proper HTML.

##### Share on other sites
Quote:
 Original post by WashuNext time try using proper HTML.

Thank you for your patient response. I just viewed the HTML source on my failed post and noticed I missed the ending quote in the anchor. Forgive me for my poor typing skills.

• 18
• 29
• 11
• 21
• 16