public InterseptResult PoligonContains(CoordinatePoligon poligon) { if (poligon.IncludeTo(this)) { return(InterseptResult.Contains); } for (var i = 0; i < poligon.Count; i++) { if (LineContains(poligon[i]) != InterseptResult.None) { return(InterseptResult.Intersepts); } } if (poligon.PointContains(LeftTop) != InterseptResult.None && poligon.PointContains(RightTop) != InterseptResult.None && poligon.PointContains(RightBottom) != InterseptResult.None && poligon.PointContains(LeftBottom) != InterseptResult.None) { return(InterseptResult.Supersets); } return(InterseptResult.None); }
public InterseptResult PoligonContains(CoordinatePoligon poligon) { if (poligon.IncludeTo(this)) return InterseptResult.Contains; for (var i = 0; i < poligon.Count; i++) { if (LineContains(poligon[i]) != InterseptResult.None) return InterseptResult.Intersepts; } if (poligon.PointContains(LeftTop) != InterseptResult.None && poligon.PointContains(RightTop) != InterseptResult.None && poligon.PointContains(RightBottom) != InterseptResult.None && poligon.PointContains(LeftBottom) != InterseptResult.None) return InterseptResult.Supersets; return InterseptResult.None; }