Sign in to follow this  

Rectangle vs AABB intersection

This topic is 3196 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

Hi. I am working on a problem where I have a grid of AABB (in fact CUBES, all same size on all axis) and quads that can be on any orientation. Those quads are not necessarily quads, in fact are rectangles. Those rectangles are at most same size as of the size of the cube, never larger, but sometimes smaller. I have the option of divide the quad in 3 triangles then use the separation axis theorem. But I am hoping I can find a solution that is faster for this situation (since the quads with limited size constrains might help simplify the solution). I've been trying for a while. Tried working with the projection of the quad on each of the 3 axis aligned planes, but it didn't worked. I don need to know WHERE they intersect, only if they DO intersect. Now I come here for help. Has anyone seen any algorithm suited for this task? Thanks for any help you can offer.

Share this post


Link to post
Share on other sites
You can use the separating axis theorem for rectangles too, where the axes you'll need to use are the two axes of the quad, the three axes of the box, and the cross products of all combinations of one axis from the rect, and one axis from the box.

Share this post


Link to post
Share on other sites

This topic is 3196 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