/// <summary> /// Determine the intersection of a line with this rectangle /// <para>If the line is contained within the rectangle it is not considered intersecting</para> /// </summary> /// <param name="line"></param> /// <returns></returns> public Locus <T> Intersection(Line2D <T> line) { Locus <T> result = new EmptyLocus <T>(); foreach (Line2D <T> vertice in Vertices) { Locus <T> verticeIntersection = line.Intersection(vertice); if (!(verticeIntersection is EmptyLocus <T>)) { result = CombineIntersections((dynamic)result, (dynamic)verticeIntersection); } } return(result); }
private Locus <T> CombineIntersections(EmptyLocus <T> current, MultiPointLocus <T> addition) { return(addition); }
private Locus <T> CombineIntersections(EmptyLocus <T> current, LineSegmentLocus <T> addition) { return(addition); }