public PCZone CreatePCZone( PCZSceneManager pczsm, string zoneType, string zoneName )
{
//find a factory that supports this zone type and then call createPCZone() on it
PCZone inst = null;
foreach ( PCZoneFactory factory in pCZoneFactories.Values )
{
if ( factory.SupportsPCZoneType( zoneType ) )
{
// use this factory
inst = factory.CreatePCZone( pczsm, zoneName );
}
}
if ( null == inst )
{
// Error!
throw new AxiomException( "No factory found for zone of type '" + zoneType +
"' PCZoneFactoryManager.CreatePCZone" );
}
return inst;
}
}