public void FinaliseDeltaValues(Rectangle rect)
{
if (rect.Left <= mBoundaryX || rect.Right > mOffsetX
|| rect.Top <= mBoundaryY || rect.Bottom > mOffsetY)
{
// relevant to this node (overlaps)
// Children
if (!IsLeaf)
{
for (int i = 0; i < 4; i++)
{
TerrainQuadTreeNode child = mChildren[i];
child.FinaliseDeltaValues(rect);
}
}
// self
LodLevel[] lvls = mLodLevels.ToArray();
for (int i = 0; i < lvls.Length; i++)
{
LodLevel tmp = lvls[i];
// copy from 'calc' area to runtime value
tmp.MaxHeightDelta = tmp.CalcMaxHeightDelta;
// also trash stored cfactor
tmp.LastCFactor = 0;
}
}
}
/// <summary>