public override void Execute( ISceneQueryListener listener )
{
MovableObjectFactoryMap factories = Root.Instance.MovableObjectFactories;
foreach ( KeyValuePair<string, MovableObjectFactory> map in factories )
{
MovableObjectCollection movableObjects = this.creator.GetMovableObjectCollection( map.Value.Type );
foreach ( MovableObject movableObject in movableObjects.Values )
{
// skip group if query type doesn't match
if ( ( this.QueryTypeMask & movableObject.TypeFlags ) == 0 )
{
break;
}
// skip if unattached or filtered out by query flags
if ( !movableObject.IsAttached || ( movableObject.QueryFlags & this.queryMask ) == 0 )
{
continue;
}
if ( this.box.Intersects( movableObject.GetWorldBoundingBox() ) )
{
listener.OnQueryResult( movableObject );
}
}
}
}
}