public BoundBox(float x,float y,float width,float height) { this.X = x; this.Y = y; this.Width = width; this.Height = height; Obb = null; Circle = new Circle(new Vector2(X,y),((width+height)*0.5F)*0.5F); }
public static bool IsContacted(Circle c1, Circle c2) { bool isc = false; float dis = Vector2.DistanceSquared(c1.Center,c2.Center) ; float rs = (c1.Radius+c2.Radius)*(c1.Radius+c2.Radius); if(dis < rs) isc = true; return isc; }