Пример #1
0
        /// <summary>
        /// enumerates self and all children objects recursively.
        /// </summary>
        /// <returns></returns>
        public IEnumerator <SceneObject> GetEnumerator()
        {
            var enumerable = ITreeNodeHelper.Traverse(this, TraverseOrder.Pre);

            foreach (SceneObject item in enumerable)
            {
                yield return(item);
            }
        }
Пример #2
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public IEnumerator <SceneObject> GetEnumerator()
        {
            var enumerable = ITreeNodeHelper.DFSEnumerateRecursively(this);

            foreach (var item in enumerable)
            {
                yield return(item);
            }
        }