void GetBoundingBox(ref Vector3 terrainOffset, float patchScale, float heightScale, out BoundingBox boundingBox)
{
boundingBox = new BoundingBox();
boundingBox.Min.X = x * patchScale + terrainOffset.X;
boundingBox.Min.Y = minHeight * heightScale + terrainOffset.Y;
boundingBox.Min.Z = y * patchScale + terrainOffset.Z;
boundingBox.Max.X = (x + size) * patchScale + terrainOffset.X;
boundingBox.Max.Y = maxHeight * heightScale + terrainOffset.Y;
boundingBox.Max.Z = (y + size) * patchScale + terrainOffset.Z;
}