function updateHeights(boundingVolume, tileBounds) {
  if (!defined(tileBounds)) {
    return;
  }

  if (hasExtension(boundingVolume, "3DTILES_bounding_volume_S2")) {
    updateS2CellHeights(
      boundingVolume.extensions["3DTILES_bounding_volume_S2"],
      tileBounds.minimumHeight,
      tileBounds.maximumHeight,
    );
  } else if (defined(boundingVolume.region)) {
    updateRegionHeights(
      boundingVolume.region,
      tileBounds.minimumHeight,
      tileBounds.maximumHeight,
    );
  }
}
Update the minimum and maximum height of the bounding volume.
This is typically used to tighten a bounding volume using the
<code>TILE_MINIMUM_HEIGHT</code> and <code>TILE_MAXIMUM_HEIGHT</code>
semantics. Heights are only updated if the respective
minimumHeight/maximumHeight parameter is defined and the
bounding volume is a region or S2 cell.

@param {object} boundingVolume The bounding volume
@param {object} [tileBounds] The tile bounds
@param {number} [tileBounds.minimumHeight] The new minimum height
@param {number} [tileBounds.maximumHeight] The new maximum height
@private