I have 2 rectangles they are placed arbitrarily and I have rects all four corner point like
struct Rect
{
NSPoint topLeft;
NSPoint topRight;
NSPoint bottomLeft;
NSPoint bottomRight;
}
I want to check whether 2 rectangles intersects. I am looking a method similar to NSIntersectsRect
. But NSIntersectsRect
won't respect the rotation of rectangle. The points in structure are the points obtained after rotation.
Sample code in Objecitve-C ,C++ or C will be a great help.