public GShape(Brush stroke, Brush fill, float width) { Stroke = stroke; Fill = fill; Width = width; IntersectionResults = new List <IntersectionResult>(); Collider = new RecCollider(); }
/// <summary> /// returns true of there is overlap /// </summary> /// <param name="other"></param> /// <returns></returns> internal bool Collide(RecCollider other) { // If one rectangle is on left side of other if (Ymax < other.Ymin && Ymin < other.Ymin) { return(false); } // If one rectangle is above other if (Xmax < other.Xmin && other.Xmin > Xmax) { return(false); } return(true); }