Beispiel #1
0
        /// <summary>
        /// Applies a new depth information.
        /// </summary>
        /// <param name="depthInfo">The depth information.</param>
        public static void PushDepthInfo(DepthInfo depthInfo)
        {
            depth_stack.Push(depthInfo);

            if (CurrentDepthInfo.Equals(depthInfo))
            {
                return;
            }

            CurrentDepthInfo = depthInfo;
            setDepthInfo(CurrentDepthInfo);
        }
Beispiel #2
0
        /// <summary>
        /// Applies the last depth information.
        /// </summary>
        public static void PopDepthInfo()
        {
            Trace.Assert(depth_stack.Count > 1);

            depth_stack.Pop();
            DepthInfo depthInfo = depth_stack.Peek();

            if (CurrentDepthInfo.Equals(depthInfo))
            {
                return;
            }

            CurrentDepthInfo = depthInfo;
            setDepthInfo(CurrentDepthInfo);
        }