Axiom.Components.Terrain.TerrainQuadTreeNode.FinaliseDeltaValues C# (CSharp) Method

FinaliseDeltaValues() public method

Promote the delta values calculated to the runtime ones (this must be called in the main thread).
public FinaliseDeltaValues ( Rectangle rect ) : void
rect Axiom.Core.Rectangle
return void
        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>