Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }