From f208628667aed5d1d98d17b5dda815ae5ed9bcc9 Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Fri, 14 Aug 2009 21:37:25 -0400 Subject: * minor : Comments * Also re-trigger Panda. --- OpenSim/Region/Framework/Scenes/Scene.cs | 71 ++++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 919075c..56e5ef0 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2170,6 +2170,14 @@ namespace OpenSim.Region.Framework.Scenes } } + /// + /// Sets the Home Point. The GridService uses this to know where to put a user when they log-in + /// + /// + /// + /// + /// + /// public virtual void SetHomeRezPoint(IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags) { UserProfileData UserProfile = CommsManager.UserService.GetUserProfile(remoteClient.AgentId); @@ -2340,6 +2348,12 @@ namespace OpenSim.Region.Framework.Scenes } } + /// + /// Removes region from an avatar's known region list. This coincides with child agents. For each child agent, there will be a known region entry. + /// + /// + /// + /// public void HandleRemoveKnownRegionsFromAvatar(UUID avatarID, List regionslst) { ScenePresence av = GetScenePresence(avatarID); @@ -2355,12 +2369,19 @@ namespace OpenSim.Region.Framework.Scenes } } + /// + /// Closes all endpoints with the circuitcode provided. + /// + /// Circuit Code of the endpoint to close public override void CloseAllAgents(uint circuitcode) { // Called by ClientView to kill all circuit codes ClientManager.CloseAllAgents(circuitcode); } + /// + /// Inform all other ScenePresences on this Scene that someone else has changed position on the minimap. + /// public void NotifyMyCoarseLocationChange() { ForEachScenePresence(delegate(ScenePresence presence) { presence.CoarseLocationChange(); }); @@ -2455,9 +2476,10 @@ namespace OpenSim.Region.Framework.Scenes /// The return bool should allow for connections to be refused, but as not all calling paths /// take proper notice of it let, we allowed banned users in still. /// - /// - /// - /// + /// CircuitData of the agent who is connecting + /// Outputs the reason for the false response on this string + /// True if the region accepts this agent. False if it does not. False will + /// also return a reason. public bool NewUserConnection(AgentCircuitData agent, out string reason) { // Don't disable this log message - it's too helpful @@ -2530,6 +2552,13 @@ namespace OpenSim.Region.Framework.Scenes return true; } + /// + /// Verifies that the user has a session on the Grid + /// + /// Circuit Data of the Agent we're verifying + /// Outputs the reason for the false response on this string + /// True if the user has a session on the grid. False if it does not. False will + /// also return a reason. public virtual bool AuthenticateUser(AgentCircuitData agent, out string reason) { reason = String.Empty; @@ -2542,6 +2571,13 @@ namespace OpenSim.Region.Framework.Scenes return result; } + /// + /// Verify if the user can connect to this region. Checks the banlist and ensures that the region is set for public access + /// + /// The circuit data for the agent + /// outputs the reason to this string + /// True if the region accepts this agent. False if it does not. False will + /// also return a reason. protected virtual bool AuthorizeUser(AgentCircuitData agent, out string reason) { reason = String.Empty; @@ -2600,16 +2636,32 @@ namespace OpenSim.Region.Framework.Scenes return true; } + /// + /// Update an AgentCircuitData object with new information + /// + /// Information to update the AgentCircuitData with public void UpdateCircuitData(AgentCircuitData data) { m_authenticateHandler.UpdateAgentData(data); } + /// + /// Change the Circuit Code for the user's Circuit Data + /// + /// The old Circuit Code. Must match a previous circuit code + /// The new Circuit Code. Must not be an already existing circuit code + /// True if we successfully changed it. False if we did not public bool ChangeCircuitCode(uint oldcc, uint newcc) { return m_authenticateHandler.TryChangeCiruitCode(oldcc, newcc); } + /// + /// The Grid has requested that we log-off a user. Log them off. + /// + /// Unique ID of the avatar to log-off + /// SecureSessionID of the user, or the RegionSecret text when logging on to the grid + /// message to display to the user. Reason for being logged off public void HandleLogOffUserFromGrid(UUID AvatarID, UUID RegionSecret, string message) { ScenePresence loggingOffUser = null; @@ -2675,6 +2727,13 @@ namespace OpenSim.Region.Framework.Scenes } } + /// + /// We've got an update about an agent that sees into this region, + /// send it to ScenePresence for processing It's the full data. + /// + /// Agent that contains all of the relevant things about an agent. + /// Appearance, animations, position, etc. + /// true if we handled it. public virtual bool IncomingChildAgentDataUpdate(AgentData cAgentData) { // m_log.DebugFormat( @@ -2692,6 +2751,12 @@ namespace OpenSim.Region.Framework.Scenes return false; } + /// + /// We've got an update about an agent that sees into this region, + /// send it to ScenePresence for processing It's only positional data + /// + /// AgentPosition that contains agent positional data so we can know what to send + /// true if we handled it. public virtual bool IncomingChildAgentDataUpdate(AgentPosition cAgentData) { //m_log.Debug(" XXX Scene IncomingChildAgentDataUpdate POSITION in " + RegionInfo.RegionName); -- cgit v1.1 From 95be3eccd28f39b33e70202d2db4f7d57a99c9c8 Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Sat, 15 Aug 2009 00:01:58 -0400 Subject: * minor: comments * also re-trigger panda --- OpenSim/Region/Framework/Scenes/Scene.cs | 101 ++++++++++++++++++++++++++++++- 1 file changed, 99 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 56e5ef0..18d7bad 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1038,6 +1038,10 @@ namespace OpenSim.Region.Framework.Scenes } } + /// + /// Send out simstats data to all clients + /// + /// Stats on the Simulator's performance private void SendSimStatsPackets(SimStats stats) { List StatSendAgents = GetScenePresences(); @@ -1050,6 +1054,9 @@ namespace OpenSim.Region.Framework.Scenes } } + /// + /// Recount SceneObjectPart in parcel aabb + /// private void UpdateLand() { if (LandChannel != null) @@ -1061,11 +1068,17 @@ namespace OpenSim.Region.Framework.Scenes } } + /// + /// Update the terrain if it needs to be updated. + /// private void UpdateTerrain() { EventManager.TriggerTerrainTick(); } + /// + /// Back up queued up changes + /// private void UpdateStorageBackup() { if (!m_backingup) @@ -1078,6 +1091,9 @@ namespace OpenSim.Region.Framework.Scenes } } + /// + /// Sends out the OnFrame event to the modules + /// private void UpdateEvents() { m_eventManager.TriggerOnFrame(); @@ -1133,6 +1149,10 @@ namespace OpenSim.Region.Framework.Scenes } } + /// + /// Synchronous force backup. For deletes and links/unlinks + /// + /// Object to be backed up public void ForceSceneObjectBackup(SceneObjectGroup group) { if (group != null) @@ -1141,6 +1161,13 @@ namespace OpenSim.Region.Framework.Scenes } } + /// + /// Return object to avatar Message + /// + /// Avatar Unique Id + /// Name of object returned + /// Location of object returned + /// Reasion for object return public void AddReturn(UUID agentID, string objectName, Vector3 location, string reason) { lock (m_returns) @@ -1167,6 +1194,9 @@ namespace OpenSim.Region.Framework.Scenes #region Load Terrain + /// + /// Store the terrain in the persistant data store + /// public void SaveTerrain() { m_storageManager.DataStore.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); @@ -1269,6 +1299,10 @@ namespace OpenSim.Region.Framework.Scenes #region Load Land + /// + /// Loads all Parcel data from the datastore for region identified by regionID + /// + /// Unique Identifier of the Region to load parcel data for public void loadAllLandObjectsFromStorage(UUID regionID) { m_log.Info("[SCENE]: Loading land objects from storage"); @@ -1322,6 +1356,20 @@ namespace OpenSim.Region.Framework.Scenes m_log.Info("[SCENE]: Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)"); } + + /// + /// Gets a new rez location based on the raycast and the size of the object that is being rezzed. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// public Vector3 GetNewRezLocation(Vector3 RayStart, Vector3 RayEnd, UUID RayTargetID, Quaternion rot, byte bypassRayCast, byte RayEndIsIntersection, bool frontFacesOnly, Vector3 scale, bool FaceCenter) { Vector3 pos = Vector3.Zero; @@ -1412,6 +1460,19 @@ namespace OpenSim.Region.Framework.Scenes } } + + /// + /// Create a New SceneObjectGroup/Part by raycasting + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// public virtual void AddNewPrim(UUID ownerID, UUID groupID, Vector3 RayEnd, Quaternion rot, PrimitiveBaseShape shape, byte bypassRaycast, Vector3 RayStart, UUID RayTargetID, byte RayEndIsIntersection) @@ -1829,6 +1890,12 @@ namespace OpenSim.Region.Framework.Scenes return true; } + /// + /// Attachment rezzing + /// + /// Agent Unique ID + /// Object ID + /// False public virtual bool IncomingCreateObject(UUID userID, UUID itemID) { ScenePresence sp = GetScenePresence(userID); @@ -1841,6 +1908,13 @@ namespace OpenSim.Region.Framework.Scenes return false; } + /// + /// Adds a Scene Object group to the Scene. + /// Verifies that the creator of the object is not banned from the simulator. + /// Checks if the item is an Attachment + /// + /// + /// True if the SceneObjectGroup was added, False if it was not public bool AddSceneObject(SceneObjectGroup sceneObject) { // If the user is banned, we won't let any of their objects @@ -1933,6 +2007,10 @@ namespace OpenSim.Region.Framework.Scenes #region Add/Remove Avatar Methods + /// + /// Adding a New Client and Create a Presence for it. + /// + /// public override void AddNewClient(IClientAPI client) { SubscribeToClientEvents(client); @@ -1977,6 +2055,10 @@ namespace OpenSim.Region.Framework.Scenes EventManager.TriggerOnNewClient(client); } + /// + /// Register for events from the client + /// + /// The IClientAPI of the connected client protected virtual void SubscribeToClientEvents(IClientAPI client) { client.OnRegionHandShakeReply += SendLayerData; @@ -2070,8 +2152,8 @@ namespace OpenSim.Region.Framework.Scenes /// /// Teleport an avatar to their home region /// - /// - /// + /// The avatar's Unique ID + /// The IClientAPI for the client public virtual void TeleportClientHome(UUID agentId, IClientAPI client) { UserProfileData UserProfile = CommsManager.UserService.GetUserProfile(agentId); @@ -2099,6 +2181,21 @@ namespace OpenSim.Region.Framework.Scenes } } + /// + /// Duplicates object specified by localID at position raycasted against RayTargetObject using + /// RayEnd and RayStart to determine what the angle of the ray is + /// + /// ID of object to duplicate + /// + /// Agent doing the duplication + /// Group of new object + /// The target of the Ray + /// The ending of the ray (farthest away point) + /// The Beginning of the ray (closest point) + /// Bool to bypass raycasting + /// The End specified is the place to add the object + /// Position the object at the center of the face that it's colliding with + /// Rotate the object the same as the localID object public void doObjectDuplicateOnRay(uint localID, uint dupeFlags, UUID AgentID, UUID GroupID, UUID RayTargetObj, Vector3 RayEnd, Vector3 RayStart, bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates) -- cgit v1.1