Axiom.SceneManagers.PortalConnected.PCZPlaneBoundedVolumeListSceneQuery.Execute C# (CSharp) Метод

Execute() публичный Метод

public Execute ( ISceneQueryListener listener ) : void
listener ISceneQueryListener
Результат void
		public override void Execute( ISceneQueryListener listener )
		{
			List<PCZSceneNode> list = new List<PCZSceneNode>();
			List<PCZSceneNode> checkedNodes = new List<PCZSceneNode>();

			foreach ( PlaneBoundedVolume volume in volumes )
			{
				//find the nodes that intersect the AAB
				( (PCZSceneManager)creator ).FindNodesIn( volume, ref list, startZone, (PCZSceneNode)excludeNode );

				//grab all moveables from the node that intersect...
				foreach ( PCZSceneNode node in list )
				{
					// avoid double-check same scene node
					if ( !checkedNodes.Contains( node ) )
						continue;

					checkedNodes.Add( node );

					foreach ( MovableObject m in node.Objects )
					{
						if ( ( m.QueryFlags & queryMask ) != 0 &&
							( m.TypeFlags & queryTypeMask ) != 0 &&
							m.IsAttached && volume.Intersects( m.GetWorldBoundingBox() ) )
						{
							listener.OnQueryResult( m );
							// deal with attached objects, since they are not directly attached to nodes
							if ( m.MovableType == "Entity" )
							{
								//Check: not sure here...
								Entity e = (Entity)m;
								foreach ( MovableObject c in e.SubEntities )
								{
									if ( ( c.QueryFlags & queryMask ) > 0 &&
										volume.Intersects( c.GetWorldBoundingBox() ) )
									{
										listener.OnQueryResult( c );
									}
								}
							}
						}

					}
				}
			}
			// reset startzone and exclude node
			startZone = null;
			excludeNode = null;
		}
	}
PCZPlaneBoundedVolumeListSceneQuery