Axiom.SceneManagers.Octree.OctreeSceneManager.FindNodes C# (CSharp) Method

FindNodes() public method

public FindNodes ( Axiom.MathLib.AxisAlignedBox box, SceneNodeCollection sceneNodeList, SceneNode exclude, bool full, Axiom.SceneManagers.Octree.Octree octant ) : void
box Axiom.MathLib.AxisAlignedBox
sceneNodeList SceneNodeCollection
exclude Axiom.Core.SceneNode
full bool
octant Axiom.SceneManagers.Octree.Octree
return void
		public void FindNodes( AxisAlignedBox box, SceneNodeCollection sceneNodeList, SceneNode exclude, bool full, Octree octant )
		{
			List<OctreeNode> localList = new List<OctreeNode>();
			if ( octant == null )
			{
				octant = this.octree;
			}

			if ( !full )
			{
				AxisAlignedBox obox = octant.CullBounds;

				Intersection isect = this.Intersect( box, obox );

				if ( isect == Intersection.Outside )
				{
					return;
				}

				full = ( isect == Intersection.Inside );
			}

			foreach ( OctreeNode node in octant.NodeList.Values )
			{
				if ( node != exclude )
				{
					if ( full )
					{
						localList.Add( node );
					}
					else
					{
						Intersection nsect = this.Intersect( box, node.WorldAABB );

						if ( nsect != Intersection.Outside )
						{
							localList.Add( node );
						}
					}
				}
			}

			if ( octant.Children[ 0, 0, 0 ] != null )
				FindNodes( box, sceneNodeList, exclude, full, octant.Children[ 0, 0, 0 ] );

			if ( octant.Children[ 1, 0, 0 ] != null )
				FindNodes( box, sceneNodeList, exclude, full, octant.Children[ 1, 0, 0 ] );

			if ( octant.Children[ 0, 1, 0 ] != null )
				FindNodes( box, sceneNodeList, exclude, full, octant.Children[ 0, 1, 0 ] );

			if ( octant.Children[ 1, 1, 0 ] != null )
				FindNodes( box, sceneNodeList, exclude, full, octant.Children[ 1, 1, 0 ] );

			if ( octant.Children[ 0, 0, 1 ] != null )
				FindNodes( box, sceneNodeList, exclude, full, octant.Children[ 0, 0, 1 ] );

			if ( octant.Children[ 1, 0, 1 ] != null )
				FindNodes( box, sceneNodeList, exclude, full, octant.Children[ 1, 0, 1 ] );

			if ( octant.Children[ 0, 1, 1 ] != null )
				FindNodes( box, sceneNodeList, exclude, full, octant.Children[ 0, 1, 1 ] );

			if ( octant.Children[ 1, 1, 1 ] != null )
				FindNodes( box, sceneNodeList, exclude, full, octant.Children[ 1, 1, 1 ] );

		}

Same methods

OctreeSceneManager::FindNodes ( Axiom.MathLib.Sphere sphere, SceneNodeCollection sceneNodeList, SceneNode exclude, bool full, Axiom.SceneManagers.Octree.Octree octant ) : void