How to know if a triangle intersects an AABB.
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.
Quote:Original post by HexDump
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.
Use the method of separating axes to decide this. My web site has a document on this, <a href="http://www.magic-software.com/Documentation/MethodOfSeparatingAxes.pdf>Separating Axes
Quote:Original post by Dave Eberly
Use 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]
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.
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.
Quote:Original post by Washu
Next 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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement