/// <summary> /// Returns true if this circle entirely contains circle <paramref name='b'/>, or <paramref name='b'/> entirely contains this circle, or they exactly overlap. /// </summary> public bool ContainsOrIsContained(WCircle b) { if (this.Radius > b.Radius) { return(this.Contains(b)); } return(b.Contains(this)); }
/// <summary> /// Returns true if any part of this wedge overlaps any part of circle <paramref name='b'/>. /// </summary> public bool Overlaps(WCircle b) { WWedge a = this; WPoint[] intersections = a.Circle.GetIntersectionPoints(b); if (intersections == null) { if (!a.Circle.ContainsOrIsContained(b)) { return(false); } } //line edge overlaps circle foreach (WLineSegment lineA in this.LineEdges) { if (b.Overlaps(lineA)) { return(true); } } //arc overlaps circle if (a.ArcOverlapsArc(new WWedge(b, 0, WCircle.DEGREES_IN_CIRCLE))) { return(true); } //wedge entirely contains circle or circle entirely contains wedge if (a.Contains(b)) { return(true); } if (b.Contains(a)) { return(true); } return(false); }