Exemple #1
0
        /// <summary>
        /// Combine this aggregator with another simple volumes aggregator and store the result in this aggregator
        /// </summary>
        public SimpleVolumesCalculationsAggregator AggregateWith(SimpleVolumesCalculationsAggregator other)
        {
            _lock.Wait();
            try
            {
                //  SIGLogMessage.PublishNoODS(Self, Format('Aggregating From:%s', [Source.ToString]));
                //  SIGLogMessage.PublishNoODS(Self, Format('Into:%s', [ToString]));

                CellsUsed      += other.CellsUsed;
                CellsUsedCut   += other.CellsUsedCut;
                CellsUsedFill  += other.CellsUsedFill;
                CellsScanned   += other.CellsScanned;
                CellsDiscarded += other.CellsDiscarded;

                CoverageArea += other.CoverageArea;
                CutArea      += other.CutArea;
                FillArea     += other.FillArea;
                TotalArea    += other.TotalArea;
                BoundingExtents.Include(other.BoundingExtents);

                Volume += other.Volume;
                CutFillVolume.AddCutFillVolume(other.CutFillVolume.CutVolume, other.CutFillVolume.FillVolume);

                return(this);
            }
            finally
            {
                _lock.Release();
            }
        }
Exemple #2
0
        public ProgressiveVolumeAggregationState AggregateWith(ProgressiveVolumeAggregationState other)
        {
            //  SIGLogMessage.PublishNoODS(Self, Format('Aggregating From:%s', [Source.ToString]), slmcDebug);
            //  SIGLogMessage.PublishNoODS(Self, Format('Into:%s', [ToString]), slmcDebug);

            CellsUsed      += other.CellsUsed;
            CellsUsedCut   += other.CellsUsedCut;
            CellsUsedFill  += other.CellsUsedFill;
            CellsScanned   += other.CellsScanned;
            CellsDiscarded += other.CellsDiscarded;

            CoverageArea += other.CoverageArea;
            CutArea      += other.CutArea;
            FillArea     += other.FillArea;
            TotalArea    += other.TotalArea;
            BoundingExtents.Include(other.BoundingExtents);

            Volume += other.Volume;
            CutFillVolume.AddCutFillVolume(other.CutFillVolume.CutVolume, other.CutFillVolume.FillVolume);

            return(this);
        }