Пример #1
0
        public override void ForEachWithin(IntRectangle rectangle, EnumerateItemDelegate <T> func)
        {
            rectangle = IntRectangle.FromPoints(
                IntVectorMath.MinMax(rectangle.LeftTopFront - Offset, IntVector.Zero, SizeVector),
                IntVectorMath.MinMax(rectangle.RightBottomBack - Offset, IntVector.Zero, SizeVector)
                );

            base.ForEachWithin(rectangle, (block, coords) => func(block, coords + Offset));
        }
Пример #2
0
        public override IEnumerable <T> GetAllWithin(IntRectangle rectangle)
        {
            rectangle = IntRectangle.FromPoints(
                IntVectorMath.MinMax(rectangle.LeftTopFront - Offset, IntVector.Zero, SizeVector),
                IntVectorMath.MinMax(rectangle.RightBottomBack - Offset, IntVector.Zero, SizeVector)
                );

            return(base.GetAllWithin(rectangle));
        }