RemoveAndDestroyAllChildren() public méthode

Removes and destroys all children in the subtree of this node.
Use this to destroy all nodes found in the child subtree of this node and remove them from the scene graph. Note that all objects attached to the nodes will be detached but will not be destroyed.
public RemoveAndDestroyAllChildren ( ) : void
Résultat void
Exemple #1
0
        /// <summary>
        /// This method removes and destroys the child and all of its children.
        /// </summary>
        /// <param name="sceneNode">The node to remove and destroy</param>
        /// <remarks>
        /// Unlike removeChild, which removes a single named child from this
        /// node but does not destroy it, this method destroys the child
        /// and all of it's children.
        /// <para>
        /// Use this if you wish to recursively destroy a node as well as
        /// detaching it from it's parent. Note that any objects attached to
        /// the nodes will be detached but will not themselves be destroyed.
        /// </para>
        /// </remarks>
        public virtual void RemoveAndDestroyChild(SceneNode sceneNode)
        {
            sceneNode.RemoveAndDestroyAllChildren();

            RemoveChild(sceneNode);
            sceneNode.Creator.DestroySceneNode(sceneNode);
        }
Exemple #2
0
		/// <summary>
		/// This method removes and destroys the child and all of its children.
		/// </summary>
		/// <param name="sceneNode">The node to remove and destroy</param>
		/// <remarks>
		/// Unlike removeChild, which removes a single named child from this
		/// node but does not destroy it, this method destroys the child
		/// and all of it's children.
		/// <para>
		/// Use this if you wish to recursively destroy a node as well as
		/// detaching it from it's parent. Note that any objects attached to
		/// the nodes will be detached but will not themselves be destroyed.
		/// </para>
		/// </remarks>
		public virtual void RemoveAndDestroyChild( SceneNode sceneNode )
		{
			sceneNode.RemoveAndDestroyAllChildren();

			this.RemoveChild( sceneNode );
			sceneNode.Creator.DestroySceneNode( sceneNode );
		}