我有一组由用户绘制的点。他们将围绕着一些物体。 我需要以某种方式将这组点转化为一个形状,所以我可以找到该区域来检测碰撞。 一种图像将澄清: Set of points represented as shape http://www.imagechicken.com/uploads/1277188630025178800.jpg 。 到目前为止,我所拥有的最好想法包括遍历每一个像素,以确定它是否在形
我想使用复合对象和box2D对U形和“T”形状应用旋转到uiimageview,因为“U”形是凹多边形,所以我不能做它仅使用b2polygondef。 这是使一个“U”形框的方法时,屏幕上的用户点击 // map from the world to the screen and screen to the world
#define S2W(s) ((s)/50)
#define W2S(w)