How can I check if a rotated rect intersects a non-rotated rectangle?

60 Views Asked by At

I have a rotated retangle and a rectangle. Both are defined by their corners (however, for the non-rotated ones I also have access to topLeft, topRight, etc).

Is there a way I can check if they intersect? (It would be enough to know if they intersect, even without knowing the extent of their intersection).

enter image description here

I found solutions for two non-rotated rectangles and two rotated rectangles . Technically the solutions for two rotated rectangles could work in this case but I think that, since i know one of them is axis-aligned, there might be a faster way..