Non axis-aligned rectangle intersection [closed]

2020-02-26 10:38发布

I'm trying to find an algorithm that will compute the intersection between 2 rectangles, which are not necessarily axis-aligned, and return the resulting intersection.

This question describes finding whether an intersection exists. I'd like to have the resulting shape of the intersection, if it exists.

My application of the algorithm will use one axis-aligned rectangle and one that is not necessarily axis-aligned, but a general algorithm would be preferable.

Thanks!

0条回答
登录 后发表回答