Original Post
okay, a quick one here. does anyone know how to calculate the two points that would continue the perimeter of two intersecting rectangles without using 50 if-then-else statements? There are only two types of possibilities - side intersection and corner intersection.
cheers
Side
___________ ___________
| __o_____ | |_____
| | | | | |
| | | | | |
| | | | | |
| |__o_____| | _____|
|___________| |___________|
Corner:
__________ __________
| | | |
| | | |
______o____ | ______| |
| | | | | |
| |____o_____| | _____|
| | | |
| | | |
|___________| |___________|
the rectangles are actually axis-aligned bounding boxes, but i dont need the height component for this part. they can either be represented using vec3 Origin, Size or vec3 Min, Max.
any ideas on calculating the 3d plane those two points make wouldn''t go amiss either