RemoveNodesFromOctree() protected method

Removes the specified node and all of it's child subtree from the octree, but not from the scene graph.
This iterates the whole node tree starting from the specified node and removes them from octree partitions, but doesn't remove them from the scene graph.
protected RemoveNodesFromOctree ( OctreeNode baseNode ) : void
baseNode OctreeNode
return void
Esempio n. 1
0
        /// <summary>
        /// Removes the specified node and all of it's child subtree from the octree, but not from the scene graph.
        /// </summary>
        /// <remarks>
        /// This iterates the whole node tree starting from the specified node and removes them from octree partitions,
        /// but doesn't remove them from the scene graph.
        /// </remarks>
        /// <param name="child"></param>
        protected void RemoveNodesFromOctree(OctreeNode baseNode)
        {
            foreach (OctreeNode child in baseNode.Children)
            {
                baseNode.RemoveNodesFromOctree(child);
            }

            ((OctreeSceneManager)baseNode.Creator).RemoveOctreeNode(baseNode);
        }
Esempio n. 2
0
		/// <summary>
		/// Removes the specified node and all of it's child subtree from the octree, but not from the scene graph.
		/// </summary>
		/// <remarks>
		/// This iterates the whole node tree starting from the specified node and removes them from octree partitions,
		/// but doesn't remove them from the scene graph.
		/// </remarks>
		/// <param name="child"></param>
		protected void RemoveNodesFromOctree( OctreeNode baseNode )
		{
			foreach ( OctreeNode child in baseNode.Children )
			{
				baseNode.RemoveNodesFromOctree( child );
			}

			( (OctreeSceneManager)baseNode.Creator ).RemoveOctreeNode( baseNode );
		}