public void printDistanceField()
        {
            Logger.Log("[OpenHeightfield][printDistanceField]Log Start");
            Logger.Log("[OpenHeightfield][printDistanceField]Distance Field Spans|{0}", mSpanCount);

            int depth = -1;

            Logger.Log("\t");
            for (int width = 0; width < this.width(); ++width)
            {
                Logger.Log("{0}\t", width);
            }

            OpenHeightFieldIterator iter = GetEnumerator();

            while (iter.MoveNext())
            {
                OpenHeightSpan span = iter.Current;
                if (iter.depthIndex() != depth)
                {
                    Logger.LogWarning("\n{0}\t", ++depth);
                }
                Logger.Log("{0}\t", span.distanceToBorder());
            }

            Logger.Log("[OpenHeightfield][printDistanceField]Log End");
        }
        private void calcBorderDistanceBounds()
        {
            if (0 == mSpanCount)
            {
                return;
            }

            mMinBorderDistance = int.MaxValue;
            mMaxBorderDistance = UNKNOWN;

            OpenHeightFieldIterator iter = GetEnumerator();

            while (iter.MoveNext())
            {
                OpenHeightSpan span = iter.Current;
                mMinBorderDistance = Math.Min(mMinBorderDistance, span.distanceToBorder());
                mMaxBorderDistance = Math.Max(mMaxBorderDistance, span.distanceToBorder());
            }

            if (mMinBorderDistance == int.MaxValue)
            {
                mMinBorderDistance = UNKNOWN;
            }
        }