Esempio n. 1
0
        public IndexBoundingBox GetBoundingBox(double min, double max)
        {
            IndexBoundingBox boundingBox = weightsProvider.GetBoundingBox(grid, min, max);

            if (areLatsInverted && !boundingBox.IsSingular)
            {
                boundingBox = new IndexBoundingBox {
                    first = backIndexOffset - boundingBox.last, last = backIndexOffset - boundingBox.first
                }
            }
            ;
            return(boundingBox);
        }
Esempio n. 2
0
        public IndexBoundingBox GetBoundingBox(ITimeSegment t)
        {
            var intervals = GetTimeIntervals(t).Select(irvl => timeAxisProjection.ProjectIntervalToTheAxis(irvl)).ToArray();
            IndexBoundingBox boundingBox = new IndexBoundingBox();

            foreach (var interval in intervals)
            {
                var bb1 = weightsProvider.GetBoundingBox(grid, interval.Item1, interval.Item2);
                boundingBox = IndexBoundingBox.Union(boundingBox, bb1);
            }

            return(boundingBox);
        }