Sign in to follow this  

How to know if a triangle intersects an AABB.

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
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,
  • 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]

    Share this post


    Link to post
    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 this post


    Link to post
    Share on other sites
    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.

    Share this post


    Link to post
    Share on other sites

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

    If you intended to correct an error in the post then please contact us.

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

    Sign in to follow this