好吧,我想编写一个程序,能告诉我,如果在一个30×矩形的任何点旋转到140度旋转到200度另一个30×矩形内。
Okay, I'm trying to write a program that could tell me if any points in a 30x100 rectangle rotated to 140 degrees are inside another 30x100 rectangle rotated to 200 degrees.
说实话,我甚至不知道从哪里开始。我想过做正常的计算,然后再重新转动他们,但比他们仍然不会匹配。
Honestly, I don't even know where to start. I thought about re-rotating them before doing normal calculations, but than they still wouldn't match up.
我怎样才能做到这一点?
How can I do this?
谷歌提供的 2D旋转矩形碰撞在GameDev.net 。