public override void ProcessSubGridResult(IClientLeafSubGrid[][] subGrids) { lock (this) { foreach (IClientLeafSubGrid[] subGrid in subGrids) { if ((subGrid?.Length ?? 0) > 0 && subGrid[0] is ClientHeightLeafSubGrid SubGrid) { CellsScanned += SubGridTreeConsts.SubGridTreeCellsPerSubGrid; BoundingExtents.Include(SubGrid.WorldExtents()); SubGridUtilities.SubGridDimensionalIterator((I, J) => { var heightValue = SubGrid.Cells[I, J]; if (Math.Abs(heightValue - CellPassConsts.NullHeight) > Consts.TOLERANCE_HEIGHT) { CellsUsed++; if (MinElevation > heightValue) { MinElevation = heightValue; } if (MaxElevation < heightValue) { MaxElevation = heightValue; } } }); } } } }