Example #1
0
        /// <summary>
        /// Converts the SceneNode to a Scene
        /// </summary>
        /// <param name="snThis">this node.</param>
        public static SceneContainer ToScene(this SceneNode snThis)
        {
            var sc = new SceneContainer();

            foreach (var snThisc in snThis.Children)
            {
                sc.Children.Add(snThisc);
            }

            return(sc);
        }
Example #2
0
        /// <summary>
        /// Converts the Scene to a SceneNode with a separate Transform
        /// </summary>
        /// <param name="sc">this node.</param>
        public static SceneNode ToSceneNode(this SceneContainer sc)
        {
            var snThis = new SceneNode();

            snThis.AddComponent(new Transform());

            foreach (var scc in sc.Children)
            {
                snThis.Children.Add(scc);
            }

            return(snThis);
        }