예제 #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);
            }
        }