/// <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); } } }
//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); }
/// <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)); } }
public TestScene( RegionInfo regInfo, AgentCircuitManager authen, ISimulationDataService simDataService, IEstateDataService estateDataService, IConfigSource config, string simulatorVersion) : base(regInfo, authen, simDataService, estateDataService, config, simulatorVersion) { }
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) { }
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) { }
// '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; }
/// <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(); } }
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) { }
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); }
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; }
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; }
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; }
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; }
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; }
public SerializableRegionInfo(RegionInfo ConvertFrom) { m_regionLocX = ConvertFrom.RegionLocX; m_regionLocY = ConvertFrom.RegionLocY; m_internalEndPoint = ConvertFrom.InternalEndPoint; m_externalHostName = ConvertFrom.ExternalHostName; m_remotingPort = ConvertFrom.RemotingPort; m_httpPort = ConvertFrom.HttpPort; m_allow_alternate_ports = ConvertFrom.m_allow_alternate_ports; RemotingAddress = ConvertFrom.RemotingAddress; m_proxyUrl = ConvertFrom.proxyUrl; OriginRegionID = ConvertFrom.originRegionID; RegionName = ConvertFrom.RegionName; ServerURI = ConvertFrom.ServerURI; }
public virtual GridRegion HelloNeighbour(ulong regionHandle, RegionInfo thisRegion) { uint x = 0, y = 0; Util.RegionHandleToWorldLoc(regionHandle, out x, out y); GridRegion regInfo = m_GridService.GetRegionByPosition(thisRegion.ScopeID, (int)x, (int)y); if ((regInfo != null) && // Don't remote-call this instance; that's a startup hickup !((regInfo.ExternalHostName == thisRegion.ExternalHostName) && (regInfo.HttpPort == thisRegion.HttpPort))) { if (!DoHelloNeighbourCall(regInfo, thisRegion)) return null; } else return null; return regInfo; }
protected internal SceneGraph(Scene parent, RegionInfo regInfo) { Random random = new Random(); m_lastAllocatedLocalId = (uint)(random.NextDouble() * (double)(uint.MaxValue / 2)) + (uint)(uint.MaxValue / 4); m_parentScene = parent; m_regInfo = regInfo; //Subscript to the scene events m_parentScene.EventManager.OnNewClient += SubscribeToClientEvents; m_parentScene.EventManager.OnClosingClient += UnSubscribeToClientEvents; IConfig aurorastartupConfig = parent.Config.Configs["AuroraStartup"]; if (aurorastartupConfig != null) { m_DefaultObjectName = aurorastartupConfig.GetString("DefaultObjectName", m_DefaultObjectName); EnableFakeRaycasting = aurorastartupConfig.GetBoolean("EnableFakeRaycasting", false); } }
public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) { RegionHandshakePacket handshake = new RegionHandshakePacket(); handshake.RegionInfo = new RegionHandshakePacket.RegionInfoBlock(); handshake.RegionInfo.BillableFactor = args.billableFactor; handshake.RegionInfo.IsEstateManager = args.isEstateManager; handshake.RegionInfo.TerrainHeightRange00 = args.terrainHeightRange0; handshake.RegionInfo.TerrainHeightRange01 = args.terrainHeightRange1; handshake.RegionInfo.TerrainHeightRange10 = args.terrainHeightRange2; handshake.RegionInfo.TerrainHeightRange11 = args.terrainHeightRange3; handshake.RegionInfo.TerrainStartHeight00 = args.terrainStartHeight0; handshake.RegionInfo.TerrainStartHeight01 = args.terrainStartHeight1; handshake.RegionInfo.TerrainStartHeight10 = args.terrainStartHeight2; handshake.RegionInfo.TerrainStartHeight11 = args.terrainStartHeight3; handshake.RegionInfo.SimAccess = args.simAccess; handshake.RegionInfo.WaterHeight = args.waterHeight; handshake.RegionInfo.RegionFlags = args.regionFlags; handshake.RegionInfo.SimName = Util.StringToBytes256(args.regionName); handshake.RegionInfo.SimOwner = args.SimOwner; handshake.RegionInfo.TerrainBase0 = args.terrainBase0; handshake.RegionInfo.TerrainBase1 = args.terrainBase1; handshake.RegionInfo.TerrainBase2 = args.terrainBase2; handshake.RegionInfo.TerrainBase3 = args.terrainBase3; handshake.RegionInfo.TerrainDetail0 = args.terrainDetail0; handshake.RegionInfo.TerrainDetail1 = args.terrainDetail1; handshake.RegionInfo.TerrainDetail2 = args.terrainDetail2; handshake.RegionInfo.TerrainDetail3 = args.terrainDetail3; // I guess this is for the client to remember an old setting? handshake.RegionInfo.CacheID = UUID.Random(); handshake.RegionInfo2 = new RegionHandshakePacket.RegionInfo2Block(); handshake.RegionInfo2.RegionID = regionInfo.RegionID; handshake.RegionInfo3 = new RegionHandshakePacket.RegionInfo3Block(); handshake.RegionInfo3.CPUClassID = 9; handshake.RegionInfo3.CPURatio = 1; handshake.RegionInfo3.ColoName = Utils.EmptyBytes; handshake.RegionInfo3.ProductName = Util.StringToBytes256(regionInfo.RegionType); handshake.RegionInfo3.ProductSKU = Utils.EmptyBytes; handshake.RegionInfo4 = new RegionHandshakePacket.RegionInfo4Block[0]; Call("omp.connect.regionHandshake", handshake); }
public void Initialize() { IConfigSource openSimINI = new IniConfigSource(); IConfig startupConfig = openSimINI.AddConfig("Startup"); startupConfig.Set("physics", "OpenDynamicsEngine"); startupConfig.Set("DecodedSculptMapPath", "j2kDecodeCache"); Vector3 regionExtent = new Vector3(Constants.RegionSize, Constants.RegionSize, Constants.RegionHeight); //PhysicsScene pScene = physicsPluginManager.GetPhysicsScene( // "BulletSim", "Meshmerizer", openSimINI, "BSTestRegion", regionExtent); RegionInfo info = new RegionInfo(); info.RegionName = "ODETestRegion"; 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); pScene = new OdeScene(); Console.WriteLine("HERE " + (pScene == null ? "Null" : "Not null")); INonSharedRegionModule mod = (pScene as INonSharedRegionModule); Console.WriteLine("HERE " + (mod == null ? "Null" : "Not null")); mod.Initialise(openSimINI); mod.AddRegion(scene); mod.RegionLoaded(scene); // Loading ODEPlugin //cbt = new OdePlugin(); // Getting Physics Scene //ps = cbt.GetScene("test"); // Initializing Physics Scene. //ps.Initialise(imp.GetMesher(TopConfig), null, Vector3.Zero); float[] _heightmap = new float[(int)Constants.RegionSize * (int)Constants.RegionSize]; for (int i = 0; i < ((int)Constants.RegionSize * (int)Constants.RegionSize); i++) { _heightmap[i] = 21f; } pScene.SetTerrain(_heightmap); }
/// <summary> /// Register a region method with the BackEnd Services. /// </summary> /// <param name="regionInfo"></param> /// <returns></returns> public RegionCommsListener RegisterRegion(RegionInfo regionInfo) { //m_log.Debug("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering"); if (!m_regions.ContainsKey(regionInfo.RegionHandle)) { //m_log.Debug("CommsManager - Adding Region " + regionInfo.RegionHandle); m_regions.Add(regionInfo.RegionHandle, regionInfo); RegionCommsListener regionHost = new RegionCommsListener(); if (m_regionListeners.ContainsKey(regionInfo.RegionHandle)) { m_log.Error("[INTERREGION STANDALONE]: " + "Error:Region registered twice as an Events listener for Interregion Communications but not as a listed region. " + "In Standalone mode this will cause BIG issues. In grid mode, it means a region went down and came back up."); m_regionListeners.Remove(regionInfo.RegionHandle); } m_regionListeners.Add(regionInfo.RegionHandle, regionHost); return regionHost; } else { // Already in our list, so the region went dead and restarted. // don't replace the old regioninfo.. this might be a locking issue.. however we need to // remove it and let it add normally below or we get extremely strange and intermittant // connectivity errors. // Don't change this line below to 'm_regions[regionInfo.RegionHandle] = regionInfo' unless you // *REALLY* know what you are doing here. m_regions[regionInfo.RegionHandle] = regionInfo; m_log.Warn("[INTERREGION STANDALONE]: Region registered twice. Region went down and came back up."); RegionCommsListener regionHost = new RegionCommsListener(); if (m_regionListeners.ContainsKey(regionInfo.RegionHandle)) { m_regionListeners.Remove(regionInfo.RegionHandle); } m_regionListeners.Add(regionInfo.RegionHandle, regionHost); return regionHost; } }
/// <summary> /// Get a physics scene for the given physics engine and mesher. /// </summary> /// <param name="physEngineName"></param> /// <param name="meshEngineName"></param> /// <param name="config"></param> /// <returns></returns> public PhysicsScene GetPhysicsScene(string physEngineName, string meshEngineName, IConfigSource config, RegionInfo region) { string regionName = region.RegionName; if (String.IsNullOrEmpty(physEngineName)) { return PhysicsScene.Null; } if (String.IsNullOrEmpty(meshEngineName)) { return PhysicsScene.Null; } IMesher meshEngine = null; if (_MeshPlugins.ContainsKey(meshEngineName)) { m_log.Info("[PHYSICS]: creating meshing engine " + meshEngineName); meshEngine = _MeshPlugins[meshEngineName].GetMesher(config); } else { m_log.WarnFormat("[PHYSICS]: couldn't find meshingEngine: {0}", meshEngineName); throw new ArgumentException(String.Format("couldn't find meshingEngine: {0}", meshEngineName)); } if (_PhysPlugins.ContainsKey(physEngineName)) { m_log.Info("[PHYSICS]: creating " + physEngineName); PhysicsScene result = _PhysPlugins[physEngineName].GetScene(regionName); result.Initialise(meshEngine, config, region); return result; } else { m_log.WarnFormat("[PHYSICS]: couldn't find physicsEngine: {0}", physEngineName); throw new ArgumentException(String.Format("couldn't find physicsEngine: {0}", physEngineName)); } }
public RegionDetails(RegionInfo regInfo) { region_name = regInfo.RegionName; region_id = regInfo.RegionID.ToString(); region_x = regInfo.RegionLocX; region_y = regInfo.RegionLocY; if (regInfo.EstateSettings.EstateOwner != UUID.Zero) region_owner_id = regInfo.EstateSettings.EstateOwner.ToString(); else region_owner_id = regInfo.MasterAvatarAssignedUUID.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; if (!String.IsNullOrEmpty(regInfo.MasterAvatarFirstName)) region_owner = String.Format("{0} {1}", regInfo.MasterAvatarFirstName, regInfo.MasterAvatarLastName); }
public virtual List<GridRegion> InformRegionsNeighborsThatRegionIsUp(RegionInfo incomingRegion) { List<GridRegion> nowInformedRegions = m_LocalService.InformRegionsNeighborsThatRegionIsUp(incomingRegion); int RegionsNotInformed = Neighbors[incomingRegion.RegionID].Count - nowInformedRegions.Count; //We informed all of them locally, so quit early if (RegionsNotInformed == 0) return nowInformedRegions; //Now add the remote ones and tell it which ones have already been informed locally so that it doesn't inform them twice InformNeighborsRegionIsUp(incomingRegion, nowInformedRegions); //Now check to see if we informed everyone RegionsNotInformed = Neighbors[incomingRegion.RegionID].Count - nowInformedRegions.Count; if (RegionsNotInformed != 0) { m_log.Warn("[NeighborsService]: Failed to inform " + RegionsNotInformed + " neighbors remotely about a new neighbor."); } return nowInformedRegions; }
// This builds a minimalistic Prim, 1 SOG with 1 root SOP. A // common failure case is people adding new fields that aren't // initialized, but have non-null db constraints. We should // honestly be passing more and more null things in here. // // Please note that in Sqlite.BuildPrim there is a commented out inline version // of this so you can debug and step through the build process and check the fields // // Real World Value: Tests for situation where extending a SceneObjectGroup/SceneObjectPart // causes the application to crash at the database layer because of null values // in NOT NULL fields // private SceneObjectGroup NewSOG(string name, UUID uuid, UUID regionId) { RegionInfo regionInfo = new RegionInfo(); regionInfo.RegionID = regionId; regionInfo.RegionLocX = 0; regionInfo.RegionLocY = 0; Scene scene = new Scene(regionInfo); SceneObjectPart sop = new SceneObjectPart(); sop.Name = name; sop.Description = name; sop.Text = RandomName(); sop.SitName = RandomName(); sop.TouchName = RandomName(); sop.UUID = uuid; sop.Shape = PrimitiveBaseShape.Default; SceneObjectGroup sog = new SceneObjectGroup(sop); sog.SetScene(scene); return sog; }
private SceneObjectGroup FindSOG(string name, UUID r) { List<SceneObjectGroup> objs = db.LoadObjects(r); foreach (SceneObjectGroup sog in objs) { SceneObjectPart p = sog.RootPart; if (p.Name == name) { RegionInfo regionInfo = new RegionInfo(); regionInfo.RegionID = r; regionInfo.RegionLocX = 0; regionInfo.RegionLocY = 0; Scene scene = new Scene(regionInfo); sog.SetScene(scene); return sog; } } return null; }
public RegionStatsHandler(RegionInfo region_info) { regionInfo = region_info; osRXStatsURI = Util.SHA1Hash(regionInfo.regionSecret); osXStatsURI = Util.SHA1Hash(regionInfo.osSecret); }
public RegionStatsHandler(RegionInfo region_info) : base("GET", "/" + Util.SHA1Hash(region_info.regionSecret), "RegionStats", "Region Statistics") { regionInfo = region_info; osXStatsURI = Util.SHA1Hash(regionInfo.osSecret); }
public RegionInfo[] LoadRegions() { IConfig RegionStartupConfig = m_configSource.Configs["RegionStartup"]; if (RegionStartupConfig != null) { string url = RegionStartupConfig.GetString("WebServerURL", String.Empty).Trim(); if (url == String.Empty) { //m_log.Error("[WEBLOADER]: Unable to load webserver URL - URL was empty."); return null; } else { HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url); webRequest.Timeout = 30000; //30 Second Timeout m_log.Debug("[WEBLOADER]: Sending Download Request..."); HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse(); m_log.Info("[WEBLOADER]: Downloading Region Information From Remote Server..."); StreamReader reader = new StreamReader(webResponse.GetResponseStream()); m_log.Debug("[WEBLOADER]: Done downloading region information from server."); List<RegionInfo> regionInfos = new List<RegionInfo>(); IConfigSource source = new IniConfigSource(new Nini.Ini.IniDocument(reader.BaseStream, Nini.Ini.IniFileType.AuroraStyle)); int i = 0; foreach (IConfig config in source.Configs) { RegionInfo region = new RegionInfo(); //Use this to load the config from the file RegionLoaderFileSystem system = new RegionLoaderFileSystem(); system.LoadRegionFromFile("REGION CONFIG #" + (i + 1), "", false, m_configSource, config.Name); regionInfos.Add(region); i++; } return regionInfos.ToArray(); } } return null; }
public abstract void Initialise(IMesher meshmerizer, RegionInfo region);
public void UpdateRegionInfo(string oldName, RegionInfo regionInfo) { //Can't add regions to remote locations }
public void DeleteRegion(RegionInfo region) { }
public override void Initialise(IMesher meshmerizer, RegionInfo region) { // Does nothing right now }
protected virtual void SetCallbackURL(AgentData agent, RegionInfo region) { agent.CallbackURI = region.ServerURI + "agent/" + agent.AgentID.ToString() + "/" + region.RegionID.ToString() + "/release/"; m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Set callback URL to {0}", agent.CallbackURI); }
public RegionStatsSimpleHandler(RegionInfo region_info) : base("/" + Util.SHA1Hash(region_info.regionSecret)) { regionInfo = region_info; osXStatsURI = Util.SHA1Hash(regionInfo.osSecret); }