Exemple #1
0
        public void InitalizeBoundSearchStructures(IList <Rect> bounds)
        {
            _horizontallySortedBounds = new LinkedAvlTree <BoundsComparer>();
            _verticallySortedBounds   = new LinkedAvlTree <BoundsComparer>();
            foreach (var r in bounds)
            {
                _horizontallySortedBounds.Add(new BoundsComparer(new RectangleWrapper(r),
                                                                 BoundsComparer.CompareType.CompareX));

                _verticallySortedBounds.Add(new BoundsComparer(new RectangleWrapper(r),
                                                               BoundsComparer.CompareType.CompareY));
            }
        }
Exemple #2
0
        public void InitalizeBoundSearchStructures(IEnumerable <IBoundsProvider> bounds)
        {
            _horizontallySortedBounds = new LinkedAvlTree <BoundsComparer>();
            _verticallySortedBounds   = new LinkedAvlTree <BoundsComparer>();
            if (bounds != null)
            {
                foreach (var b in bounds)
                {
                    _horizontallySortedBounds.Add(new BoundsComparer(b,
                                                                     BoundsComparer.CompareType.CompareX));

                    _verticallySortedBounds.Add(new BoundsComparer(b,
                                                                   BoundsComparer.CompareType.CompareY));
                }
            }
        }