AddRegion() 공개 메소드

public AddRegion ( Scene scene ) : void
scene OpenSim.Region.Framework.Scenes.Scene
리턴 void
예제 #1
0
        private static LocalAssetServicesConnector StartAssetService(Scene testScene, CoreAssetCache cache)
        {
            LocalAssetServicesConnector assetService = new LocalAssetServicesConnector();
            IConfigSource config = new IniConfigSource();
            
            config.AddConfig("Modules");            
            config.Configs["Modules"].Set("AssetServices", "LocalAssetServicesConnector");            
            config.AddConfig("AssetService");
            config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Services.AssetService.dll:AssetService");            
            config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
            
            assetService.Initialise(config);
            assetService.AddRegion(testScene);

            if (cache != null)
            {
                IConfigSource cacheConfig = new IniConfigSource();
                cacheConfig.AddConfig("Modules");
                cacheConfig.Configs["Modules"].Set("AssetCaching", "CoreAssetCache");
                cacheConfig.AddConfig("AssetCache");

                cache.Initialise(cacheConfig);
                cache.AddRegion(testScene);
                cache.RegionLoaded(testScene);
                testScene.AddRegionModule(cache.Name, cache);
            }

            assetService.RegionLoaded(testScene);
            testScene.AddRegionModule(assetService.Name, assetService);
            
            return assetService;
        }
예제 #2
0
 private static void StartAssetService(Scene testScene, bool real)
 {
     ISharedRegionModule assetService = new LocalAssetServicesConnector();
     IConfigSource config = new IniConfigSource();
     config.AddConfig("Modules");
     config.AddConfig("AssetService");
     config.Configs["Modules"].Set("AssetServices", "LocalAssetServicesConnector");
     if (real)
         config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Services.AssetService.dll:AssetService");
     else
         config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:TestAssetService");
     config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
     assetService.Initialise(config);
     assetService.AddRegion(testScene);
     assetService.RegionLoaded(testScene);
     testScene.AddRegionModule(assetService.Name, assetService);
     m_assetService = assetService;
 }
예제 #3
0
        /// <summary>
        /// Set up a test scene
        /// </summary>
        /// <param name="name">Name of the region</param>
        /// <param name="id">ID of the region</param>
        /// <param name="x">X co-ordinate of the region</param>
        /// <param name="y">Y co-ordinate of the region</param>
        /// <param name="cm">This should be the same if simulating two scenes within a standalone</param>
        /// <param name="startServices">Start associated threads for the services used by the scene</param>
        /// <returns></returns>
        public static TestScene SetupScene(
            string name, UUID id, uint x, uint y, TestCommunicationsManager cm, bool startServices)
        {
            Console.WriteLine("Setting up test scene {0}", name);
            
            MainServer.Instance = new BaseHttpServer(980);
            RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1");
            regInfo.RegionName = name;
            regInfo.RegionID = id;

            AgentCircuitManager acm = new AgentCircuitManager();
            SceneCommunicationService scs = new SceneCommunicationService(cm);

            StorageManager sm = new StorageManager("OpenSim.Data.Null.dll", "", "");
            IConfigSource configSource = new IniConfigSource();

            TestScene testScene = new TestScene(
                regInfo, acm, cm, scs, sm, null, false, false, false, configSource, null);

            INonSharedRegionModule capsModule = new CapabilitiesModule();            
            capsModule.Initialise(new IniConfigSource());
            testScene.AddRegionModule(capsModule.Name, capsModule);
            capsModule.AddRegion(testScene);
            
            IRegionModule godsModule = new GodsModule();
            godsModule.Initialise(testScene, new IniConfigSource());
            testScene.AddModule(godsModule.Name, godsModule);

            ISharedRegionModule assetService = new LocalAssetServicesConnector();
            IniConfigSource config = new IniConfigSource();
            config.AddConfig("Modules");
            config.AddConfig("AssetService");
            config.Configs["Modules"].Set("AssetServices", "LocalAssetServicesConnector");
            config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Services.AssetService.dll:AssetService");
            config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
            assetService.Initialise(config); 
            assetService.AddRegion(testScene);
            assetService.RegionLoaded(testScene);
            testScene.AddRegionModule(assetService.Name, assetService);
            assetService.PostInitialise();

            ISharedRegionModule inventoryService = new LocalInventoryServicesConnector();
            config = new IniConfigSource();
            config.AddConfig("Modules");
            config.AddConfig("InventoryService");
            config.Configs["Modules"].Set("InventoryServices", "LocalInventoryServicesConnector");
            config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Services.InventoryService.dll:InventoryService");
            config.Configs["InventoryService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
            inventoryService.Initialise(config);
            inventoryService.AddRegion(testScene);
            inventoryService.RegionLoaded(testScene);
            testScene.AddRegionModule(inventoryService.Name, inventoryService);
            inventoryService.PostInitialise();
 
            testScene.SetModuleInterfaces();

            testScene.LandChannel = new TestLandChannel();
            testScene.LoadWorldMap();

            PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager();
            physicsPluginManager.LoadPluginsFromAssembly("Physics/OpenSim.Region.Physics.BasicPhysicsPlugin.dll");
            testScene.PhysicsScene
                = physicsPluginManager.GetPhysicsScene("basicphysics", "ZeroMesher", configSource, "test");

            return testScene;
        }