Пример #1
0
        public IEnumerable <PolygonChanged> OutGoingForPoint(int index)
        {
            var changedPointPolygons  = MutatePoint(index);
            var insertedPointPolygons = InsertPoint(index);
            var removedPointPolygons  = ListUtil.Singleton(RemovePoint(index));
            var changeInsertPolygons  = ListUtil.New <IEnumerable <IList <PolygonChanged> > >(
                changedPointPolygons.DivideInfinite(CHANGES_PER_INSERT), insertedPointPolygons.Select(
                    x => ListUtil.New(x))).Intertwine().SelectMany(x => x);
            var combined = removedPointPolygons.Concat(changeInsertPolygons);

            return(combined.Where(x => !x.NewPolygon.IsSelfIntersecting()));
        }