# Rectangle vs AABB intersection

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

## 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 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.

1. 1
2. 2
3. 3
Rutin
16
4. 4
5. 5
JoeJ
12

• 10
• 9
• 14
• 10
• 25
• ### Forum Statistics

• Total Topics
632646
• Total Posts
3007638
• ### Who's Online (See full list)

There are no registered users currently online

×