当前位置: 首页>>代码示例>>C#>>正文


C# Framework.RegionInfo类代码示例

本文整理汇总了C#中OpenSim.Framework.RegionInfo的典型用法代码示例。如果您正苦于以下问题:C# RegionInfo类的具体用法?C# RegionInfo怎么用?C# RegionInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


RegionInfo类属于OpenSim.Framework命名空间,在下文中一共展示了RegionInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: InformNeighboursThatRegionIsUpAsync

        /// <summary>
        /// Asynchronous call to information neighbouring regions that this region is up
        /// </summary>
        /// <param name="region"></param>
        /// <param name="regionhandle"></param>
        private void InformNeighboursThatRegionIsUpAsync(INeighbourService neighbourService, RegionInfo region, ulong regionhandle)
        {
            uint x = 0, y = 0;
            Utils.LongToUInts(regionhandle, out x, out y);

            GridRegion neighbour = null;
            if (neighbourService != null)
                neighbour = neighbourService.HelloNeighbour(regionhandle, region);
            else
                m_log.DebugFormat( "{0} neighbour service provided for region {0} to inform neigbhours of status", LogHeader, m_scene.Name);

            if (neighbour != null)
            {
                m_log.DebugFormat( "{0} Region {1} successfully informed neighbour {2} at {3}-{4} that it is up",
                    LogHeader, m_scene.Name, neighbour.RegionName, Util.WorldToRegionLoc(x), Util.WorldToRegionLoc(y));

                m_scene.EventManager.TriggerOnRegionUp(neighbour);
            }
            else
            {
                m_log.WarnFormat(
                    "[SCENE COMMUNICATION SERVICE]: Region {0} failed to inform neighbour at {1}-{2} that it is up.",
                    m_scene.Name, Util.WorldToRegionLoc(x), Util.WorldToRegionLoc(y));
            }
        }
开发者ID:szielins,项目名称:opensim,代码行数:30,代码来源:SceneCommunicationService.cs

示例2: RegionStatsHandler

        //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

        public RegionStatsHandler(OpenSim.Framework.RegionInfo region_info)
        {
            regionInfo = region_info;
            osRXStatsURI = Util.SHA1Hash(regionInfo.regionSecret);
            osXStatsURI = Util.SHA1Hash(regionInfo.osSecret);
  
        }
开发者ID:AlphaStaxLLC,项目名称:taiga,代码行数:9,代码来源:RegionStatsHandler.cs

示例3: InformNeighboursThatRegionIsUpAsync

        /// <summary>
        /// Asynchronous call to information neighbouring regions that this region is up
        /// </summary>
        /// <param name="region"></param>
        /// <param name="regionhandle"></param>
        private void InformNeighboursThatRegionIsUpAsync(INeighbourService neighbourService, RegionInfo region, ulong regionhandle)
        {
            uint x = 0, y = 0;
            Utils.LongToUInts(regionhandle, out x, out y);

            GridRegion neighbour = null;
            if (neighbourService != null)
                neighbour = neighbourService.HelloNeighbour(regionhandle, region);
            else
                m_log.DebugFormat("[SCS]: No neighbour service provided for informing neigbhours of this region");

            if (neighbour != null)
            {
                m_log.DebugFormat("[INTERGRID]: Successfully informed neighbour {0}-{1} that I'm here", x / Constants.RegionSize, y / Constants.RegionSize);
                m_scene.EventManager.TriggerOnRegionUp(neighbour);
            }
            else
            {
                if (m_scene.GridService != null)
                {
                    neighbour = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y);
                    
                    if (neighbour != null)
                        m_log.InfoFormat("[INTERGRID]: Failed to inform neighbour {0}-{1} that I'm here.", x / Constants.RegionSize, y / Constants.RegionSize);
                }
            }
        }
开发者ID:shangcheng,项目名称:Aurora,代码行数:32,代码来源:SceneCommunicationService.cs

示例4: TestScene

 public TestScene(
     RegionInfo regInfo, AgentCircuitManager authen, PhysicsScene physicsScene,
     SceneCommunicationService sceneGridService, ISimulationDataService simDataService, IEstateDataService estateDataService,
     IConfigSource config, string simulatorVersion)
     : base(regInfo, authen, physicsScene, sceneGridService, simDataService, estateDataService,
            config, simulatorVersion)
 {
 }
开发者ID:ffoliveira,项目名称:opensimulator,代码行数:8,代码来源:TestScene.cs

示例5: TestScene

 public TestScene(
     RegionInfo regInfo, AgentCircuitManager authen, 
     ISimulationDataService simDataService, IEstateDataService estateDataService,
     IConfigSource config, string simulatorVersion)
     : base(regInfo, authen, simDataService, estateDataService,
            config, simulatorVersion)
 {
 }
开发者ID:CassieEllen,项目名称:opensim,代码行数:8,代码来源:TestScene.cs

示例6: CreateBasicPhysicsEngine

    // 'engineName' is the Bullet engine to use. Either null (for unmanaged), "BulletUnmanaged" or "BulletXNA"
    // 'params' is a set of keyValue pairs to set in the engine's configuration file (override defaults)
    //      May be 'null' if there are no overrides.
    public static BSScene CreateBasicPhysicsEngine(Dictionary<string,string> paramOverrides)
    {
        IConfigSource openSimINI = new IniConfigSource();
        IConfig startupConfig = openSimINI.AddConfig("Startup");
        startupConfig.Set("physics", "BulletSim");
        startupConfig.Set("meshing", "Meshmerizer");
        startupConfig.Set("cacheSculptMaps", "false");  // meshmerizer shouldn't save maps

        IConfig bulletSimConfig = openSimINI.AddConfig("BulletSim");
        // If the caller cares, specify the bullet engine otherwise it will default to "BulletUnmanaged".
        // bulletSimConfig.Set("BulletEngine", "BulletUnmanaged");
        // bulletSimConfig.Set("BulletEngine", "BulletXNA");
        bulletSimConfig.Set("MeshSculptedPrim", "false");
        bulletSimConfig.Set("ForceSimplePrimMeshing", "true");
        if (paramOverrides != null)
        {
            foreach (KeyValuePair<string, string> kvp in paramOverrides)
            {
                bulletSimConfig.Set(kvp.Key, kvp.Value);
            }
        }

        // If a special directory exists, put detailed logging therein.
        // This allows local testing/debugging without having to worry that the build engine will output logs.
        if (Directory.Exists("physlogs"))
        {
            bulletSimConfig.Set("PhysicsLoggingDir","./physlogs");
            bulletSimConfig.Set("PhysicsLoggingEnabled","True");
            bulletSimConfig.Set("PhysicsLoggingDoFlush","True");
            bulletSimConfig.Set("VehicleLoggingEnabled","True");
        }

        Vector3 regionExtent = new Vector3(Constants.RegionSize, Constants.RegionSize, Constants.RegionHeight);
       
        RegionInfo info = new RegionInfo();
        info.RegionName = "BSTestRegion";
        info.RegionSizeX = info.RegionSizeY = info.RegionSizeZ = Constants.RegionSize;
        OpenSim.Region.Framework.Scenes.Scene scene = new OpenSim.Region.Framework.Scenes.Scene(info);

        IMesher mesher = new OpenSim.Region.PhysicsModules.Meshing.Meshmerizer();
        INonSharedRegionModule mod = mesher as INonSharedRegionModule;
        mod.Initialise(openSimINI);
        mod.AddRegion(scene);
        mod.RegionLoaded(scene);

        BSScene pScene = new BSScene();
        mod = (pScene as INonSharedRegionModule);
        mod.Initialise(openSimINI);
        mod.AddRegion(scene);
        mod.RegionLoaded(scene);

        // Since the asset requestor is not initialized, any mesh or sculptie will be a cube.
        // In the future, add a fake asset fetcher to get meshes and sculpts.
        // bsScene.RequestAssetMethod = ???;

        return pScene;
    }
开发者ID:Gitlab11,项目名称:opensim,代码行数:60,代码来源:BulletSimTestsUtil.cs

示例7: LoadLibraries

        /// <summary>
        /// Use the asset set information at path to load assets
        /// </summary>
        /// <param name="path"></param>
        /// <param name="assets"></param>
        protected void LoadLibraries(string iarFileName)
        {
            m_log.InfoFormat("[LIBRARY INVENTORY]: Loading iar file {0}", iarFileName);
           
            RegionInfo regInfo = new RegionInfo();
            Scene m_MockScene = null;
            //Make the scene for the IAR loader
            if (m_registry is Scene)
                m_MockScene = (Scene)m_registry;
            else
            {
                m_MockScene = new Scene(regInfo);
                m_MockScene.AddModuleInterfaces(m_registry.GetInterfaces());
            }

            UserAccount uinfo = m_MockScene.UserAccountService.GetUserAccount(UUID.Zero, m_service.LibraryOwner);
            //Make the user account for the default IAR
            if (uinfo == null)
            {
                m_log.Warn("Creating user " + m_service.LibraryOwnerName[0] + " " + m_service.LibraryOwnerName[1]);
                m_MockScene.UserAccountService.CreateUser(m_service.LibraryOwnerName[0],
                    m_service.LibraryOwnerName[1], "", "");
                uinfo = m_MockScene.UserAccountService.GetUserAccount(UUID.Zero, m_service.LibraryOwnerName[0],
                    m_service.LibraryOwnerName[1]);
                m_MockScene.InventoryService.CreateUserInventory(uinfo.PrincipalID);
            }

            InventoryFolderBase rootFolder = m_MockScene.InventoryService.GetRootFolder(uinfo.PrincipalID);

            if (null == rootFolder)
            {
                //We need to create the root folder, otherwise the IAR freaks
                m_MockScene.InventoryService.CreateUserInventory(uinfo.PrincipalID);
            }

            InventoryArchiveReadRequest archread = new InventoryArchiveReadRequest(m_MockScene, uinfo, "/", iarFileName, false);

            try
            {
                List<InventoryNodeBase> nodes = new List<InventoryNodeBase>(archread.Execute(true));
                if (nodes.Count == 0)
                    return;
                InventoryFolderImpl f = new InventoryFolderImpl((InventoryFolderBase)nodes[0]);

                TraverseFolders(f, nodes[0].ID, m_MockScene);
                //This is our loaded folder
                m_service.AddToDefaultInventory(f);
            }
            catch (Exception e)
            {
                m_log.DebugFormat("[LIBRARY MODULE]: Exception when processing archive {0}: {1}", iarFileName, e.StackTrace);
            }
            finally
            {
                archread.Close();
            }
        }
开发者ID:KristenMynx,项目名称:Aurora-Sim,代码行数:62,代码来源:DefaultInventoryIARLoader.cs

示例8: TestScene

 public TestScene(
     RegionInfo regInfo, AgentCircuitManager authen,
     SceneCommunicationService sceneGridService, StorageManager storeManager,
     ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
     bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
     : base(regInfo, authen, sceneGridService, storeManager, moduleLoader,
            dumpAssetsToFile, physicalPrim, SeeIntoRegionFromNeighbor, config, simulatorVersion)
 {
 }
开发者ID:AlexRa,项目名称:opensim-mods-Alex,代码行数:9,代码来源:TestScene.cs

示例9: TestScene

 public TestScene(
     RegionInfo regInfo, AgentCircuitManager authen,
     SceneCommunicationService sceneGridService, ISimulationDataService simDataService, IEstateDataService estateDataService,
     ModuleLoader moduleLoader, bool dumpAssetsToFile,
     IConfigSource config, string simulatorVersion)
     : base(regInfo, authen, sceneGridService, simDataService, estateDataService, moduleLoader,
            dumpAssetsToFile, config, simulatorVersion)
 {
 }
开发者ID:JAllard,项目名称:opensim,代码行数:9,代码来源:TestScene.cs

示例10: RegisterRegion

 public override RegionCommsListener RegisterRegion(RegionInfo regionInfo)
 {
     if (!regionInfo.RegionID.Equals(UUID.Zero))
     {
         m_regionsOnInstance.Add(regionInfo);
         return m_remoteBackend.RegisterRegion(regionInfo);
     }
     else
         return base.RegisterRegion(regionInfo);
 }
开发者ID:ChrisD,项目名称:opensim,代码行数:10,代码来源:HGGridServicesGridMode.cs

示例11: CreateBuyPoint

        public BuyPoint CreateBuyPoint(UUID uuid, string name, Vector3 pos, ILandObject osParcel, RegionInfo regionInfo)
        {
            BuyPoint bp = new BuyPoint(uuid, name, pos, osParcel) { Game = m_controller.Game };
            bp.Location.RegionName = regionInfo.RegionName;
            bp.Location.RegionId = regionInfo.RegionID;
            bp.Location.RegionX = regionInfo.RegionLocX;
            bp.Location.RegionY = regionInfo.RegionLocY;

            return bp;
        }
开发者ID:justinccdev,项目名称:waterwars,代码行数:10,代码来源:ModelFactory.cs

示例12: HelloNeighbour

 public virtual bool HelloNeighbour(ulong regionHandle, RegionInfo thisRegion)
 {
     RegionInfo regInfo = m_MapService.RequestNeighbourInfo(regionHandle);
     if ((regInfo != null) &&
         // Don't remote-call this instance; that's a startup hickup
         !((regInfo.ExternalHostName == thisRegion.ExternalHostName) && (regInfo.HttpPort == thisRegion.HttpPort)))
     {
         return DoHelloNeighbourCall(regInfo, thisRegion);
     }
     //else
     //    m_log.Warn("[REST COMMS]: Region not found " + regionHandle);
     return false;
 }
开发者ID:ChrisD,项目名称:opensim,代码行数:13,代码来源:NeighbourServiceConnector.cs

示例13: HGScene

        public HGScene(RegionInfo regInfo, AgentCircuitManager authen,
                       CommunicationsManager commsMan, SceneCommunicationService sceneGridService,
                       StorageManager storeManager,
                       ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
                       bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
            : base(regInfo, authen, commsMan, sceneGridService, storeManager, moduleLoader,
                   dumpAssetsToFile, physicalPrim, SeeIntoRegionFromNeighbor, config, simulatorVersion)
        {
            m_log.Info("[HGScene]: Starting HGScene.");
            m_assMapper = new HGAssetMapper(this);

            EventManager.OnNewInventoryItemUploadComplete += UploadInventoryItem;
        }
开发者ID:AlphaStaxLLC,项目名称:taiga,代码行数:13,代码来源:HGScene.Inventory.cs

示例14: RegionDetails

        public RegionDetails(RegionInfo regInfo)
        {
            region_name = regInfo.RegionName;
            region_id = regInfo.RegionID.ToString();
            region_x = regInfo.RegionLocX;
            region_y = regInfo.RegionLocY;
            region_owner_id = regInfo.EstateSettings.EstateOwner.ToString();
            region_http_port = regInfo.HttpPort;
            region_server_uri = regInfo.ServerURI;
            region_external_hostname = regInfo.ExternalHostName;

            Uri uri = new Uri(region_server_uri);
            region_port = (uint)uri.Port;
        }
开发者ID:BackupTheBerlios,项目名称:seleon,代码行数:14,代码来源:RegionDetails.cs

示例15: AdjustRegionHandle

        public static void AdjustRegionHandle(RegionInfo regInfo)
        {
            ulong realHandle = 0;
            if (!UInt64.TryParse(regInfo.regionSecret, out realHandle))
                // Nope
                return;

            uint x = 0, y = 0;
            Utils.LongToUInts(realHandle, out x, out y);
            x = x / Constants.RegionSize;
            y = y / Constants.RegionSize;
            regInfo.RegionLocX = x;
            regInfo.RegionLocY = y;
        }
开发者ID:diva,项目名称:Grider,代码行数:14,代码来源:OpenSimComms.cs


注:本文中的OpenSim.Framework.RegionInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。