Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
        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;
        }