diff options
author | Justin Clarke Casey | 2008-11-12 20:16:46 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-11-12 20:16:46 +0000 |
commit | cec112c87a0e9b259ddff215422bde3fc5dd4dc2 (patch) | |
tree | fac2489ef1c8d3ec0e0acaf0533e4db46575f170 | |
parent | * Update Mono.Addins.dll to 0.4, as per sdague's suggestion (diff) | |
download | opensim-SC-cec112c87a0e9b259ddff215422bde3fc5dd4dc2.zip opensim-SC-cec112c87a0e9b259ddff215422bde3fc5dd4dc2.tar.gz opensim-SC-cec112c87a0e9b259ddff215422bde3fc5dd4dc2.tar.bz2 opensim-SC-cec112c87a0e9b259ddff215422bde3fc5dd4dc2.tar.xz |
* refactor: as per a recent opensim-dev thread, rename InnerScene to SceneGraph to make it more descriptive of its intended function
-rw-r--r-- | OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 194 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneGraph.cs (renamed from OpenSim/Region/Environment/Scenes/InnerScene.cs) | 9 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Manager/PhysicsScene.cs | 2 |
9 files changed, 119 insertions, 107 deletions
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs index e58d945..5229489 100644 --- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs +++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs | |||
@@ -261,7 +261,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement | |||
261 | ((SceneObjectGroup)scene.Entities[uuid]).DetachFromBackup(); | 261 | ((SceneObjectGroup)scene.Entities[uuid]).DetachFromBackup(); |
262 | scene.PhysicsScene.RemovePrim(((SceneObjectGroup)scene.Entities[uuid]).RootPart.PhysActor); | 262 | scene.PhysicsScene.RemovePrim(((SceneObjectGroup)scene.Entities[uuid]).RootPart.PhysActor); |
263 | scene.SendKillObject(scene.Entities[uuid].LocalId); | 263 | scene.SendKillObject(scene.Entities[uuid].LocalId); |
264 | scene.m_innerScene.DeleteSceneObject(uuid, false); | 264 | scene.m_sceneGraph.DeleteSceneObject(uuid, false); |
265 | ((SceneObjectGroup)scene.Entities[uuid]).DeleteGroup(false); | 265 | ((SceneObjectGroup)scene.Entities[uuid]).DeleteGroup(false); |
266 | } | 266 | } |
267 | catch(Exception e) | 267 | catch(Exception e) |
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs index 0202841..bb3a18d 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs | |||
@@ -260,7 +260,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
260 | List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); | 260 | List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); |
261 | 261 | ||
262 | // Filter entities so that we only have scene objects. | 262 | // Filter entities so that we only have scene objects. |
263 | // FIXME: Would be nicer to have this as a proper list in InnerScene, since lots of methods | 263 | // FIXME: Would be nicer to have this as a proper list in SceneGraph, since lots of methods |
264 | // end up having to do this | 264 | // end up having to do this |
265 | foreach (EntityBase entity in entities) | 265 | foreach (EntityBase entity in entities) |
266 | { | 266 | { |
diff --git a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs index c38d502..52175f4 100644 --- a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs | |||
@@ -490,7 +490,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
490 | } | 490 | } |
491 | else if (reportType == 0) | 491 | else if (reportType == 0) |
492 | { | 492 | { |
493 | SceneData = m_scene.m_innerScene.GetTopScripts(); | 493 | SceneData = m_scene.m_sceneGraph.GetTopScripts(); |
494 | } | 494 | } |
495 | 495 | ||
496 | List<LandStatReportItem> SceneReport = new List<LandStatReportItem>(); | 496 | List<LandStatReportItem> SceneReport = new List<LandStatReportItem>(); |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 7e32086..c6ad94c 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -2342,7 +2342,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2342 | public UUID RezSingleAttachment(IClientAPI remoteClient, UUID itemID, | 2342 | public UUID RezSingleAttachment(IClientAPI remoteClient, UUID itemID, |
2343 | uint AttachmentPt) | 2343 | uint AttachmentPt) |
2344 | { | 2344 | { |
2345 | SceneObjectGroup att = m_innerScene.RezSingleAttachment(remoteClient, itemID, AttachmentPt); | 2345 | SceneObjectGroup att = m_sceneGraph.RezSingleAttachment(remoteClient, itemID, AttachmentPt); |
2346 | 2346 | ||
2347 | if (att == null) | 2347 | if (att == null) |
2348 | { | 2348 | { |
@@ -2375,7 +2375,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2375 | 2375 | ||
2376 | public void AttachObject(IClientAPI controllingClient, uint localID, uint attachPoint, Quaternion rot, Vector3 pos, bool silent) | 2376 | public void AttachObject(IClientAPI controllingClient, uint localID, uint attachPoint, Quaternion rot, Vector3 pos, bool silent) |
2377 | { | 2377 | { |
2378 | m_innerScene.AttachObject(controllingClient, localID, attachPoint, rot, pos, silent); | 2378 | m_sceneGraph.AttachObject(controllingClient, localID, attachPoint, rot, pos, silent); |
2379 | } | 2379 | } |
2380 | 2380 | ||
2381 | public void AttachObject(IClientAPI remoteClient, uint AttachmentPt, UUID itemID, SceneObjectGroup att) | 2381 | public void AttachObject(IClientAPI remoteClient, uint AttachmentPt, UUID itemID, SceneObjectGroup att) |
@@ -2455,7 +2455,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
2455 | } | 2455 | } |
2456 | 2456 | ||
2457 | } | 2457 | } |
2458 | m_innerScene.DetachSingleAttachmentToInv(itemID, remoteClient); | 2458 | |
2459 | m_sceneGraph.DetachSingleAttachmentToInv(itemID, remoteClient); | ||
2459 | } | 2460 | } |
2460 | 2461 | ||
2461 | public void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID) | 2462 | public void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID) |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 0d0823e..e5d0c3f 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -71,7 +71,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
71 | protected List<RegionInfo> m_regionRestartNotifyList = new List<RegionInfo>(); | 71 | protected List<RegionInfo> m_regionRestartNotifyList = new List<RegionInfo>(); |
72 | protected List<RegionInfo> m_neighbours = new List<RegionInfo>(); | 72 | protected List<RegionInfo> m_neighbours = new List<RegionInfo>(); |
73 | 73 | ||
74 | public InnerScene m_innerScene; | 74 | /// <value> |
75 | /// The scene graph for this scene | ||
76 | /// </value> | ||
77 | /// TODO: Possibly stop other classes being able to manipulate this directly. | ||
78 | public SceneGraph m_sceneGraph; | ||
75 | 79 | ||
76 | private int m_timePhase = 24; | 80 | private int m_timePhase = 24; |
77 | 81 | ||
@@ -179,14 +183,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
179 | // an instance to the physics plugin's Scene object. | 183 | // an instance to the physics plugin's Scene object. |
180 | public PhysicsScene PhysicsScene | 184 | public PhysicsScene PhysicsScene |
181 | { | 185 | { |
182 | set { m_innerScene.PhysicsScene = value; } | 186 | set { m_sceneGraph.PhysicsScene = value; } |
183 | get { return (m_innerScene.PhysicsScene); } | 187 | get { return (m_sceneGraph.PhysicsScene); } |
184 | } | 188 | } |
185 | 189 | ||
186 | // This gets locked so things stay thread safe. | 190 | // This gets locked so things stay thread safe. |
187 | public object SyncRoot | 191 | public object SyncRoot |
188 | { | 192 | { |
189 | get { return m_innerScene.m_syncRoot; } | 193 | get { return m_sceneGraph.m_syncRoot; } |
190 | } | 194 | } |
191 | 195 | ||
192 | public float TimeDilation | 196 | public float TimeDilation |
@@ -212,23 +216,23 @@ namespace OpenSim.Region.Environment.Scenes | |||
212 | get { return m_defaultScriptEngine; } | 216 | get { return m_defaultScriptEngine; } |
213 | } | 217 | } |
214 | 218 | ||
215 | // Local reference to the objects in the scene (which are held in innerScene) | 219 | // Local reference to the objects in the scene (which are held in the scenegraph) |
216 | // public Dictionary<UUID, SceneObjectGroup> Objects | 220 | // public Dictionary<UUID, SceneObjectGroup> Objects |
217 | // { | 221 | // { |
218 | // get { return m_innerScene.SceneObjects; } | 222 | // get { return m_sceneGraph.SceneObjects; } |
219 | // } | 223 | // } |
220 | 224 | ||
221 | // Reference to all of the agents in the scene (root and child) | 225 | // Reference to all of the agents in the scene (root and child) |
222 | protected Dictionary<UUID, ScenePresence> m_scenePresences | 226 | protected Dictionary<UUID, ScenePresence> m_scenePresences |
223 | { | 227 | { |
224 | get { return m_innerScene.ScenePresences; } | 228 | get { return m_sceneGraph.ScenePresences; } |
225 | set { m_innerScene.ScenePresences = value; } | 229 | set { m_sceneGraph.ScenePresences = value; } |
226 | } | 230 | } |
227 | 231 | ||
228 | // protected Dictionary<UUID, SceneObjectGroup> m_sceneObjects | 232 | // protected Dictionary<UUID, SceneObjectGroup> m_sceneObjects |
229 | // { | 233 | // { |
230 | // get { return m_innerScene.SceneObjects; } | 234 | // get { return m_sceneGraph.SceneObjects; } |
231 | // set { m_innerScene.SceneObjects = value; } | 235 | // set { m_sceneGraph.SceneObjects = value; } |
232 | // } | 236 | // } |
233 | 237 | ||
234 | /// <summary> | 238 | /// <summary> |
@@ -241,14 +245,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
241 | /// </summary> | 245 | /// </summary> |
242 | public Dictionary<UUID, EntityBase> Entities | 246 | public Dictionary<UUID, EntityBase> Entities |
243 | { | 247 | { |
244 | get { return m_innerScene.Entities; } | 248 | get { return m_sceneGraph.Entities; } |
245 | set { m_innerScene.Entities = value; } | 249 | set { m_sceneGraph.Entities = value; } |
246 | } | 250 | } |
247 | 251 | ||
248 | public Dictionary<UUID, ScenePresence> m_restorePresences | 252 | public Dictionary<UUID, ScenePresence> m_restorePresences |
249 | { | 253 | { |
250 | get { return m_innerScene.RestorePresences; } | 254 | get { return m_sceneGraph.RestorePresences; } |
251 | set { m_innerScene.RestorePresences = value; } | 255 | set { m_sceneGraph.RestorePresences = value; } |
252 | } | 256 | } |
253 | 257 | ||
254 | public int objectCapacity = 45000; | 258 | public int objectCapacity = 45000; |
@@ -296,15 +300,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
296 | EventManager.OnLandObjectRemoved += | 300 | EventManager.OnLandObjectRemoved += |
297 | new EventManager.LandObjectRemoved(m_storageManager.DataStore.RemoveLandObject); | 301 | new EventManager.LandObjectRemoved(m_storageManager.DataStore.RemoveLandObject); |
298 | 302 | ||
299 | m_innerScene = new InnerScene(this, m_regInfo); | 303 | m_sceneGraph = new SceneGraph(this, m_regInfo); |
300 | 304 | ||
301 | // If the Inner scene has an Unrecoverable error, restart this sim. | 305 | // If the scene graph has an Unrecoverable error, restart this sim. |
302 | // Currently the only thing that causes it to happen is two kinds of specific | 306 | // Currently the only thing that causes it to happen is two kinds of specific |
303 | // Physics based crashes. | 307 | // Physics based crashes. |
304 | // | 308 | // |
305 | // Out of memory | 309 | // Out of memory |
306 | // Operating system has killed the plugin | 310 | // Operating system has killed the plugin |
307 | m_innerScene.UnRecoverableError += RestartNow; | 311 | m_sceneGraph.UnRecoverableError += RestartNow; |
308 | 312 | ||
309 | RegisterDefaultSceneEvents(); | 313 | RegisterDefaultSceneEvents(); |
310 | 314 | ||
@@ -644,11 +648,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
644 | 648 | ||
645 | // Stop all client threads. | 649 | // Stop all client threads. |
646 | ForEachScenePresence(delegate(ScenePresence avatar) { avatar.ControllingClient.Close(true); }); | 650 | ForEachScenePresence(delegate(ScenePresence avatar) { avatar.ControllingClient.Close(true); }); |
651 | |||
647 | // Stop updating the scene objects and agents. | 652 | // Stop updating the scene objects and agents. |
648 | //m_heartbeatTimer.Close(); | 653 | //m_heartbeatTimer.Close(); |
649 | shuttingdown = true; | 654 | shuttingdown = true; |
650 | // close the inner scene | 655 | |
651 | m_innerScene.Close(); | 656 | m_sceneGraph.Close(); |
657 | |||
652 | // De-register with region communications (events cleanup) | 658 | // De-register with region communications (events cleanup) |
653 | UnRegisterRegionWithComms(); | 659 | UnRegisterRegionWithComms(); |
654 | 660 | ||
@@ -726,7 +732,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
726 | //updateLock.WaitOne(); | 732 | //updateLock.WaitOne(); |
727 | float physicsFPS = 0; | 733 | float physicsFPS = 0; |
728 | //m_log.Info("sadfadf" + m_neighbours.Count.ToString()); | 734 | //m_log.Info("sadfadf" + m_neighbours.Count.ToString()); |
729 | int agentsInScene = m_innerScene.GetRootAgentCount() + m_innerScene.GetChildAgentCount(); | 735 | int agentsInScene = m_sceneGraph.GetRootAgentCount() + m_sceneGraph.GetChildAgentCount(); |
730 | 736 | ||
731 | if (agentsInScene > 21) | 737 | if (agentsInScene > 21) |
732 | { | 738 | { |
@@ -757,15 +763,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
757 | 763 | ||
758 | physicsMS2 = System.Environment.TickCount; | 764 | physicsMS2 = System.Environment.TickCount; |
759 | if ((m_frame % m_update_physics == 0) && m_physics_enabled) | 765 | if ((m_frame % m_update_physics == 0) && m_physics_enabled) |
760 | m_innerScene.UpdatePreparePhysics(); | 766 | m_sceneGraph.UpdatePreparePhysics(); |
761 | physicsMS2 = System.Environment.TickCount - physicsMS2; | 767 | physicsMS2 = System.Environment.TickCount - physicsMS2; |
762 | 768 | ||
763 | if (m_frame % m_update_entitymovement == 0) | 769 | if (m_frame % m_update_entitymovement == 0) |
764 | m_innerScene.UpdateEntityMovement(); | 770 | m_sceneGraph.UpdateEntityMovement(); |
765 | 771 | ||
766 | physicsMS = System.Environment.TickCount; | 772 | physicsMS = System.Environment.TickCount; |
767 | if ((m_frame % m_update_physics == 0) && m_physics_enabled) | 773 | if ((m_frame % m_update_physics == 0) && m_physics_enabled) |
768 | physicsFPS = m_innerScene.UpdatePhysics( | 774 | physicsFPS = m_sceneGraph.UpdatePhysics( |
769 | Math.Max(SinceLastFrame.TotalSeconds, m_timespan) | 775 | Math.Max(SinceLastFrame.TotalSeconds, m_timespan) |
770 | ); | 776 | ); |
771 | if (m_frame % m_update_physics == 0 && SynchronizeScene != null) | 777 | if (m_frame % m_update_physics == 0 && SynchronizeScene != null) |
@@ -777,16 +783,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
777 | otherMS = System.Environment.TickCount; | 783 | otherMS = System.Environment.TickCount; |
778 | // run through all entities looking for updates (slow) | 784 | // run through all entities looking for updates (slow) |
779 | if (m_frame % m_update_entities == 0) | 785 | if (m_frame % m_update_entities == 0) |
780 | m_innerScene.UpdateEntities(); | 786 | m_sceneGraph.UpdateEntities(); |
781 | 787 | ||
782 | // run through entities that have scheduled themselves for | 788 | // run through entities that have scheduled themselves for |
783 | // updates looking for updates(faster) | 789 | // updates looking for updates(faster) |
784 | if (m_frame % m_update_entitiesquick == 0) | 790 | if (m_frame % m_update_entitiesquick == 0) |
785 | m_innerScene.ProcessUpdates(); | 791 | m_sceneGraph.ProcessUpdates(); |
786 | 792 | ||
787 | // Run through scenepresences looking for updates | 793 | // Run through scenepresences looking for updates |
788 | if (m_frame % m_update_presences == 0) | 794 | if (m_frame % m_update_presences == 0) |
789 | m_innerScene.UpdatePresences(); | 795 | m_sceneGraph.UpdatePresences(); |
790 | 796 | ||
791 | // Delete temp-on-rez stuff | 797 | // Delete temp-on-rez stuff |
792 | if (m_frame % m_update_backup == 0) | 798 | if (m_frame % m_update_backup == 0) |
@@ -814,16 +820,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
814 | m_statsReporter.AddTimeDilation(m_timedilation); | 820 | m_statsReporter.AddTimeDilation(m_timedilation); |
815 | m_statsReporter.AddFPS(1); | 821 | m_statsReporter.AddFPS(1); |
816 | m_statsReporter.AddInPackets(0); | 822 | m_statsReporter.AddInPackets(0); |
817 | m_statsReporter.SetRootAgents(m_innerScene.GetRootAgentCount()); | 823 | m_statsReporter.SetRootAgents(m_sceneGraph.GetRootAgentCount()); |
818 | m_statsReporter.SetChildAgents(m_innerScene.GetChildAgentCount()); | 824 | m_statsReporter.SetChildAgents(m_sceneGraph.GetChildAgentCount()); |
819 | m_statsReporter.SetObjects(m_innerScene.GetTotalObjectsCount()); | 825 | m_statsReporter.SetObjects(m_sceneGraph.GetTotalObjectsCount()); |
820 | m_statsReporter.SetActiveObjects(m_innerScene.GetActiveObjectsCount()); | 826 | m_statsReporter.SetActiveObjects(m_sceneGraph.GetActiveObjectsCount()); |
821 | frameMS = System.Environment.TickCount - frameMS; | 827 | frameMS = System.Environment.TickCount - frameMS; |
822 | m_statsReporter.addFrameMS(frameMS); | 828 | m_statsReporter.addFrameMS(frameMS); |
823 | m_statsReporter.addPhysicsMS(physicsMS); | 829 | m_statsReporter.addPhysicsMS(physicsMS); |
824 | m_statsReporter.addOtherMS(otherMS); | 830 | m_statsReporter.addOtherMS(otherMS); |
825 | m_statsReporter.SetActiveScripts(m_innerScene.GetActiveScriptsCount()); | 831 | m_statsReporter.SetActiveScripts(m_sceneGraph.GetActiveScriptsCount()); |
826 | m_statsReporter.addScriptLines(m_innerScene.GetScriptLPS()); | 832 | m_statsReporter.addScriptLines(m_sceneGraph.GetScriptLPS()); |
827 | } | 833 | } |
828 | } | 834 | } |
829 | catch (NotImplementedException) | 835 | catch (NotImplementedException) |
@@ -1163,7 +1169,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1163 | //AXdirection = new Vector3(direction.X, direction.Y, direction.Z); | 1169 | //AXdirection = new Vector3(direction.X, direction.Y, direction.Z); |
1164 | 1170 | ||
1165 | //testRay = new Ray(AXOrigin, AXdirection); | 1171 | //testRay = new Ray(AXOrigin, AXdirection); |
1166 | //rt = m_innerScene.GetClosestIntersectingPrim(testRay); | 1172 | //rt = m_sceneGraph.GetClosestIntersectingPrim(testRay); |
1167 | 1173 | ||
1168 | //if (rt.HitTF) | 1174 | //if (rt.HitTF) |
1169 | //{ | 1175 | //{ |
@@ -1642,7 +1648,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1642 | 1648 | ||
1643 | // TODO: Raytrace better here | 1649 | // TODO: Raytrace better here |
1644 | 1650 | ||
1645 | //EntityIntersection ei = m_innerScene.GetClosestIntersectingPrim(new Ray(AXOrigin, AXdirection)); | 1651 | //EntityIntersection ei = m_sceneGraph.GetClosestIntersectingPrim(new Ray(AXOrigin, AXdirection)); |
1646 | Ray NewRay = new Ray(AXOrigin, AXdirection); | 1652 | Ray NewRay = new Ray(AXOrigin, AXdirection); |
1647 | 1653 | ||
1648 | // Ray Trace against target here | 1654 | // Ray Trace against target here |
@@ -1676,7 +1682,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1676 | { | 1682 | { |
1677 | // We don't have a target here, so we're going to raytrace all the objects in the scene. | 1683 | // We don't have a target here, so we're going to raytrace all the objects in the scene. |
1678 | 1684 | ||
1679 | EntityIntersection ei = m_innerScene.GetClosestIntersectingPrim(new Ray(AXOrigin, AXdirection), true, false); | 1685 | EntityIntersection ei = m_sceneGraph.GetClosestIntersectingPrim(new Ray(AXOrigin, AXdirection), true, false); |
1680 | 1686 | ||
1681 | // Un-comment the following line to print the raytrace results to the console. | 1687 | // Un-comment the following line to print the raytrace results to the console. |
1682 | //m_log.Info("[RAYTRACERESULTS]: Hit:" + ei.HitTF.ToString() + " Point: " + ei.ipoint.ToString() + " Normal: " + ei.normal.ToString()); | 1688 | //m_log.Info("[RAYTRACERESULTS]: Hit:" + ei.HitTF.ToString() + " Point: " + ei.ipoint.ToString() + " Normal: " + ei.normal.ToString()); |
@@ -1790,7 +1796,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1790 | public bool AddRestoredSceneObject( | 1796 | public bool AddRestoredSceneObject( |
1791 | SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted) | 1797 | SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted) |
1792 | { | 1798 | { |
1793 | return m_innerScene.AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted); | 1799 | return m_sceneGraph.AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted); |
1794 | } | 1800 | } |
1795 | 1801 | ||
1796 | /// <summary> | 1802 | /// <summary> |
@@ -1803,7 +1809,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1803 | /// </param> | 1809 | /// </param> |
1804 | public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) | 1810 | public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) |
1805 | { | 1811 | { |
1806 | return m_innerScene.AddNewSceneObject(sceneObject, attachToBackup); | 1812 | return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup); |
1807 | } | 1813 | } |
1808 | 1814 | ||
1809 | /// <summary> | 1815 | /// <summary> |
@@ -1869,7 +1875,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1869 | /// <returns>true if the object was in the scene, false if it was not</returns> | 1875 | /// <returns>true if the object was in the scene, false if it was not</returns> |
1870 | public bool UnlinkSceneObject(UUID uuid, bool resultOfLinkingObjects) | 1876 | public bool UnlinkSceneObject(UUID uuid, bool resultOfLinkingObjects) |
1871 | { | 1877 | { |
1872 | if (m_innerScene.DeleteSceneObject(uuid, resultOfLinkingObjects)) | 1878 | if (m_sceneGraph.DeleteSceneObject(uuid, resultOfLinkingObjects)) |
1873 | { | 1879 | { |
1874 | if (!resultOfLinkingObjects) | 1880 | if (!resultOfLinkingObjects) |
1875 | m_storageManager.DataStore.RemoveObject(uuid, | 1881 | m_storageManager.DataStore.RemoveObject(uuid, |
@@ -2203,7 +2209,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2203 | 2209 | ||
2204 | presence.initializeScenePresence(client, RegionInfo, this); | 2210 | presence.initializeScenePresence(client, RegionInfo, this); |
2205 | 2211 | ||
2206 | m_innerScene.AddScenePresence(presence); | 2212 | m_sceneGraph.AddScenePresence(presence); |
2207 | 2213 | ||
2208 | lock (m_restorePresences) | 2214 | lock (m_restorePresences) |
2209 | { | 2215 | { |
@@ -2228,40 +2234,40 @@ namespace OpenSim.Region.Environment.Scenes | |||
2228 | { | 2234 | { |
2229 | client.OnRegionHandShakeReply += SendLayerData; | 2235 | client.OnRegionHandShakeReply += SendLayerData; |
2230 | client.OnAddPrim += AddNewPrim; | 2236 | client.OnAddPrim += AddNewPrim; |
2231 | client.OnUpdatePrimGroupPosition += m_innerScene.UpdatePrimPosition; | 2237 | client.OnUpdatePrimGroupPosition += m_sceneGraph.UpdatePrimPosition; |
2232 | client.OnUpdatePrimSinglePosition += m_innerScene.UpdatePrimSinglePosition; | 2238 | client.OnUpdatePrimSinglePosition += m_sceneGraph.UpdatePrimSinglePosition; |
2233 | client.OnUpdatePrimGroupRotation += m_innerScene.UpdatePrimRotation; | 2239 | client.OnUpdatePrimGroupRotation += m_sceneGraph.UpdatePrimRotation; |
2234 | client.OnUpdatePrimGroupMouseRotation += m_innerScene.UpdatePrimRotation; | 2240 | client.OnUpdatePrimGroupMouseRotation += m_sceneGraph.UpdatePrimRotation; |
2235 | client.OnUpdatePrimSingleRotation += m_innerScene.UpdatePrimSingleRotation; | 2241 | client.OnUpdatePrimSingleRotation += m_sceneGraph.UpdatePrimSingleRotation; |
2236 | client.OnUpdatePrimScale += m_innerScene.UpdatePrimScale; | 2242 | client.OnUpdatePrimScale += m_sceneGraph.UpdatePrimScale; |
2237 | client.OnUpdatePrimGroupScale += m_innerScene.UpdatePrimGroupScale; | 2243 | client.OnUpdatePrimGroupScale += m_sceneGraph.UpdatePrimGroupScale; |
2238 | client.OnUpdateExtraParams += m_innerScene.UpdateExtraParam; | 2244 | client.OnUpdateExtraParams += m_sceneGraph.UpdateExtraParam; |
2239 | client.OnUpdatePrimShape += m_innerScene.UpdatePrimShape; | 2245 | client.OnUpdatePrimShape += m_sceneGraph.UpdatePrimShape; |
2240 | //client.OnRequestMapBlocks += RequestMapBlocks; // handled in a module now. | 2246 | //client.OnRequestMapBlocks += RequestMapBlocks; // handled in a module now. |
2241 | client.OnUpdatePrimTexture += m_innerScene.UpdatePrimTexture; | 2247 | client.OnUpdatePrimTexture += m_sceneGraph.UpdatePrimTexture; |
2242 | client.OnTeleportLocationRequest += RequestTeleportLocation; | 2248 | client.OnTeleportLocationRequest += RequestTeleportLocation; |
2243 | client.OnTeleportLandmarkRequest += RequestTeleportLandmark; | 2249 | client.OnTeleportLandmarkRequest += RequestTeleportLandmark; |
2244 | client.OnObjectSelect += SelectPrim; | 2250 | client.OnObjectSelect += SelectPrim; |
2245 | client.OnObjectDeselect += DeselectPrim; | 2251 | client.OnObjectDeselect += DeselectPrim; |
2246 | client.OnGrabUpdate += m_innerScene.MoveObject; | 2252 | client.OnGrabUpdate += m_sceneGraph.MoveObject; |
2247 | client.OnDeRezObject += DeRezObject; | 2253 | client.OnDeRezObject += DeRezObject; |
2248 | client.OnRezObject += RezObject; | 2254 | client.OnRezObject += RezObject; |
2249 | client.OnRezSingleAttachmentFromInv += RezSingleAttachment; | 2255 | client.OnRezSingleAttachmentFromInv += RezSingleAttachment; |
2250 | client.OnDetachAttachmentIntoInv += DetachSingleAttachmentToInv; | 2256 | client.OnDetachAttachmentIntoInv += DetachSingleAttachmentToInv; |
2251 | client.OnObjectAttach += m_innerScene.AttachObject; | 2257 | client.OnObjectAttach += m_sceneGraph.AttachObject; |
2252 | client.OnObjectDetach += m_innerScene.DetachObject; | 2258 | client.OnObjectDetach += m_sceneGraph.DetachObject; |
2253 | client.OnObjectDrop += m_innerScene.DropObject; | 2259 | client.OnObjectDrop += m_sceneGraph.DropObject; |
2254 | client.OnNameFromUUIDRequest += CommsManager.HandleUUIDNameRequest; | 2260 | client.OnNameFromUUIDRequest += CommsManager.HandleUUIDNameRequest; |
2255 | client.OnObjectDescription += m_innerScene.PrimDescription; | 2261 | client.OnObjectDescription += m_sceneGraph.PrimDescription; |
2256 | client.OnObjectName += m_innerScene.PrimName; | 2262 | client.OnObjectName += m_sceneGraph.PrimName; |
2257 | client.OnObjectClickAction += m_innerScene.PrimClickAction; | 2263 | client.OnObjectClickAction += m_sceneGraph.PrimClickAction; |
2258 | client.OnObjectMaterial += m_innerScene.PrimMaterial; | 2264 | client.OnObjectMaterial += m_sceneGraph.PrimMaterial; |
2259 | client.OnLinkObjects += m_innerScene.LinkObjects; | 2265 | client.OnLinkObjects += m_sceneGraph.LinkObjects; |
2260 | client.OnDelinkObjects += m_innerScene.DelinkObjects; | 2266 | client.OnDelinkObjects += m_sceneGraph.DelinkObjects; |
2261 | client.OnObjectDuplicate += m_innerScene.DuplicateObject; | 2267 | client.OnObjectDuplicate += m_sceneGraph.DuplicateObject; |
2262 | client.OnObjectDuplicateOnRay += doObjectDuplicateOnRay; | 2268 | client.OnObjectDuplicateOnRay += doObjectDuplicateOnRay; |
2263 | client.OnUpdatePrimFlags += m_innerScene.UpdatePrimFlags; | 2269 | client.OnUpdatePrimFlags += m_sceneGraph.UpdatePrimFlags; |
2264 | client.OnRequestObjectPropertiesFamily += m_innerScene.RequestObjectPropertiesFamily; | 2270 | client.OnRequestObjectPropertiesFamily += m_sceneGraph.RequestObjectPropertiesFamily; |
2265 | client.OnRequestGodlikePowers += handleRequestGodlikePowers; | 2271 | client.OnRequestGodlikePowers += handleRequestGodlikePowers; |
2266 | client.OnGodKickUser += HandleGodlikeKickUser; | 2272 | client.OnGodKickUser += HandleGodlikeKickUser; |
2267 | client.OnObjectPermissions += HandleObjectPermissionsUpdate; | 2273 | client.OnObjectPermissions += HandleObjectPermissionsUpdate; |
@@ -2287,11 +2293,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
2287 | client.OnMoneyTransferRequest += ProcessMoneyTransferRequest; | 2293 | client.OnMoneyTransferRequest += ProcessMoneyTransferRequest; |
2288 | client.OnParcelBuy += ProcessParcelBuy; | 2294 | client.OnParcelBuy += ProcessParcelBuy; |
2289 | client.OnAvatarPickerRequest += ProcessAvatarPickerRequest; | 2295 | client.OnAvatarPickerRequest += ProcessAvatarPickerRequest; |
2290 | client.OnObjectIncludeInSearch += m_innerScene.MakeObjectSearchable; | 2296 | client.OnObjectIncludeInSearch += m_sceneGraph.MakeObjectSearchable; |
2291 | client.OnTeleportHomeRequest += TeleportClientHome; | 2297 | client.OnTeleportHomeRequest += TeleportClientHome; |
2292 | client.OnSetStartLocationRequest += SetHomeRezPoint; | 2298 | client.OnSetStartLocationRequest += SetHomeRezPoint; |
2293 | client.OnUndo += m_innerScene.HandleUndo; | 2299 | client.OnUndo += m_sceneGraph.HandleUndo; |
2294 | client.OnObjectGroupRequest += m_innerScene.HandleObjectGroupUpdate; | 2300 | client.OnObjectGroupRequest += m_sceneGraph.HandleObjectGroupUpdate; |
2295 | client.OnParcelReturnObjectsRequest += LandChannel.ReturnObjectsInParcel; | 2301 | client.OnParcelReturnObjectsRequest += LandChannel.ReturnObjectsInParcel; |
2296 | client.OnParcelSetOtherCleanTime += LandChannel.SetParcelOtherCleanTime; | 2302 | client.OnParcelSetOtherCleanTime += LandChannel.SetParcelOtherCleanTime; |
2297 | client.OnObjectSaleInfo += ObjectSaleInfo; | 2303 | client.OnObjectSaleInfo += ObjectSaleInfo; |
@@ -2403,7 +2409,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2403 | 2409 | ||
2404 | // TODO: Raytrace better here | 2410 | // TODO: Raytrace better here |
2405 | 2411 | ||
2406 | //EntityIntersection ei = m_innerScene.GetClosestIntersectingPrim(new Ray(AXOrigin, AXdirection)); | 2412 | //EntityIntersection ei = m_sceneGraph.GetClosestIntersectingPrim(new Ray(AXOrigin, AXdirection)); |
2407 | Ray NewRay = new Ray(AXOrigin, AXdirection); | 2413 | Ray NewRay = new Ray(AXOrigin, AXdirection); |
2408 | 2414 | ||
2409 | // Ray Trace against target here | 2415 | // Ray Trace against target here |
@@ -2433,14 +2439,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
2433 | { | 2439 | { |
2434 | Quaternion worldRot = target2.GetWorldRotation(); | 2440 | Quaternion worldRot = target2.GetWorldRotation(); |
2435 | 2441 | ||
2436 | // SceneObjectGroup obj = m_innerScene.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot); | 2442 | // SceneObjectGroup obj = m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot); |
2437 | m_innerScene.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot); | 2443 | m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot); |
2438 | //obj.Rotation = worldRot; | 2444 | //obj.Rotation = worldRot; |
2439 | //obj.UpdateGroupRotation(worldRot); | 2445 | //obj.UpdateGroupRotation(worldRot); |
2440 | } | 2446 | } |
2441 | else | 2447 | else |
2442 | { | 2448 | { |
2443 | m_innerScene.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID); | 2449 | m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID); |
2444 | } | 2450 | } |
2445 | } | 2451 | } |
2446 | 2452 | ||
@@ -2486,7 +2492,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2486 | AvatarAppearance appearance = null; | 2492 | AvatarAppearance appearance = null; |
2487 | GetAvatarAppearance(client, out appearance); | 2493 | GetAvatarAppearance(client, out appearance); |
2488 | 2494 | ||
2489 | ScenePresence avatar = m_innerScene.CreateAndAddScenePresence(client, child, appearance); | 2495 | ScenePresence avatar = m_sceneGraph.CreateAndAddScenePresence(client, child, appearance); |
2490 | 2496 | ||
2491 | return avatar; | 2497 | return avatar; |
2492 | } | 2498 | } |
@@ -2538,11 +2544,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
2538 | 2544 | ||
2539 | if (avatar.IsChildAgent) | 2545 | if (avatar.IsChildAgent) |
2540 | { | 2546 | { |
2541 | m_innerScene.removeUserCount(false); | 2547 | m_sceneGraph.removeUserCount(false); |
2542 | } | 2548 | } |
2543 | else | 2549 | else |
2544 | { | 2550 | { |
2545 | m_innerScene.removeUserCount(true); | 2551 | m_sceneGraph.removeUserCount(true); |
2546 | m_sceneGridService.LogOffUser(agentID, RegionInfo.RegionID, RegionInfo.RegionHandle, avatar.AbsolutePosition, avatar.Lookat); | 2552 | m_sceneGridService.LogOffUser(agentID, RegionInfo.RegionID, RegionInfo.RegionHandle, avatar.AbsolutePosition, avatar.Lookat); |
2547 | List<ulong> childknownRegions = new List<ulong>(); | 2553 | List<ulong> childknownRegions = new List<ulong>(); |
2548 | List<ulong> ckn = avatar.GetKnownRegionList(); | 2554 | List<ulong> ckn = avatar.GetKnownRegionList(); |
@@ -2587,7 +2593,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2587 | agentTransactions.RemoveAgentAssetTransactions(agentID); | 2593 | agentTransactions.RemoveAgentAssetTransactions(agentID); |
2588 | } | 2594 | } |
2589 | 2595 | ||
2590 | m_innerScene.RemoveScenePresence(agentID); | 2596 | m_sceneGraph.RemoveScenePresence(agentID); |
2591 | 2597 | ||
2592 | try | 2598 | try |
2593 | { | 2599 | { |
@@ -2807,7 +2813,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2807 | cap.ItemUpdatedCall = CapsUpdateInventoryItemAsset; | 2813 | cap.ItemUpdatedCall = CapsUpdateInventoryItemAsset; |
2808 | cap.TaskScriptUpdatedCall = CapsUpdateTaskInventoryScriptAsset; | 2814 | cap.TaskScriptUpdatedCall = CapsUpdateTaskInventoryScriptAsset; |
2809 | cap.CAPSFetchInventoryDescendents = CommsManager.UserProfileCacheService.HandleFetchInventoryDescendentsCAPS; | 2815 | cap.CAPSFetchInventoryDescendents = CommsManager.UserProfileCacheService.HandleFetchInventoryDescendentsCAPS; |
2810 | cap.GetClient = m_innerScene.GetControllingClient; | 2816 | cap.GetClient = m_sceneGraph.GetControllingClient; |
2811 | m_capsHandlers[agentId] = cap; | 2817 | m_capsHandlers[agentId] = cap; |
2812 | } | 2818 | } |
2813 | 2819 | ||
@@ -2917,18 +2923,18 @@ namespace OpenSim.Region.Environment.Scenes | |||
2917 | /// <param name="agentID"></param> | 2923 | /// <param name="agentID"></param> |
2918 | public bool CloseConnection(UUID agentID) | 2924 | public bool CloseConnection(UUID agentID) |
2919 | { | 2925 | { |
2920 | ScenePresence presence = m_innerScene.GetScenePresence(agentID); | 2926 | ScenePresence presence = m_sceneGraph.GetScenePresence(agentID); |
2921 | 2927 | ||
2922 | if (presence != null) | 2928 | if (presence != null) |
2923 | { | 2929 | { |
2924 | // Nothing is removed here, so down count it as such | 2930 | // Nothing is removed here, so down count it as such |
2925 | // if (presence.IsChildAgent) | 2931 | // if (presence.IsChildAgent) |
2926 | // { | 2932 | // { |
2927 | // m_innerScene.removeUserCount(false); | 2933 | // m_sceneGraph.removeUserCount(false); |
2928 | // } | 2934 | // } |
2929 | // else | 2935 | // else |
2930 | // { | 2936 | // { |
2931 | // m_innerScene.removeUserCount(true); | 2937 | // m_sceneGraph.removeUserCount(true); |
2932 | // } | 2938 | // } |
2933 | 2939 | ||
2934 | // Tell a single agent to disconnect from the region. | 2940 | // Tell a single agent to disconnect from the region. |
@@ -3501,7 +3507,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3501 | } | 3507 | } |
3502 | else | 3508 | else |
3503 | { | 3509 | { |
3504 | m_innerScene.removeUserCount(!m_scenePresences[agentID].IsChildAgent); | 3510 | m_sceneGraph.removeUserCount(!m_scenePresences[agentID].IsChildAgent); |
3505 | 3511 | ||
3506 | m_scenePresences[agentID].ControllingClient.Kick(Utils.BytesToString(reason)); | 3512 | m_scenePresences[agentID].ControllingClient.Kick(Utils.BytesToString(reason)); |
3507 | m_scenePresences[agentID].ControllingClient.Close(true); | 3513 | m_scenePresences[agentID].ControllingClient.Close(true); |
@@ -3872,7 +3878,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3872 | 3878 | ||
3873 | #endregion | 3879 | #endregion |
3874 | 3880 | ||
3875 | #region InnerScene wrapper methods | 3881 | #region SceneGraph wrapper methods |
3876 | 3882 | ||
3877 | /// <summary> | 3883 | /// <summary> |
3878 | /// | 3884 | /// |
@@ -3881,22 +3887,22 @@ namespace OpenSim.Region.Environment.Scenes | |||
3881 | /// <returns></returns> | 3887 | /// <returns></returns> |
3882 | public UUID ConvertLocalIDToFullID(uint localID) | 3888 | public UUID ConvertLocalIDToFullID(uint localID) |
3883 | { | 3889 | { |
3884 | return m_innerScene.ConvertLocalIDToFullID(localID); | 3890 | return m_sceneGraph.ConvertLocalIDToFullID(localID); |
3885 | } | 3891 | } |
3886 | 3892 | ||
3887 | public void SwapRootAgentCount(bool rootChildChildRootTF) | 3893 | public void SwapRootAgentCount(bool rootChildChildRootTF) |
3888 | { | 3894 | { |
3889 | m_innerScene.SwapRootChildAgent(rootChildChildRootTF); | 3895 | m_sceneGraph.SwapRootChildAgent(rootChildChildRootTF); |
3890 | } | 3896 | } |
3891 | 3897 | ||
3892 | public void AddPhysicalPrim(int num) | 3898 | public void AddPhysicalPrim(int num) |
3893 | { | 3899 | { |
3894 | m_innerScene.AddPhysicalPrim(num); | 3900 | m_sceneGraph.AddPhysicalPrim(num); |
3895 | } | 3901 | } |
3896 | 3902 | ||
3897 | public void RemovePhysicalPrim(int num) | 3903 | public void RemovePhysicalPrim(int num) |
3898 | { | 3904 | { |
3899 | m_innerScene.RemovePhysicalPrim(num); | 3905 | m_sceneGraph.RemovePhysicalPrim(num); |
3900 | } | 3906 | } |
3901 | 3907 | ||
3902 | //The idea is to have a group of method that return a list of avatars meeting some requirement | 3908 | //The idea is to have a group of method that return a list of avatars meeting some requirement |
@@ -3909,7 +3915,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3909 | /// <returns></returns> | 3915 | /// <returns></returns> |
3910 | public List<ScenePresence> GetAvatars() | 3916 | public List<ScenePresence> GetAvatars() |
3911 | { | 3917 | { |
3912 | return m_innerScene.GetAvatars(); | 3918 | return m_sceneGraph.GetAvatars(); |
3913 | } | 3919 | } |
3914 | 3920 | ||
3915 | /// <summary> | 3921 | /// <summary> |
@@ -3919,7 +3925,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3919 | /// <returns></returns> | 3925 | /// <returns></returns> |
3920 | public List<ScenePresence> GetScenePresences() | 3926 | public List<ScenePresence> GetScenePresences() |
3921 | { | 3927 | { |
3922 | return m_innerScene.GetScenePresences(); | 3928 | return m_sceneGraph.GetScenePresences(); |
3923 | } | 3929 | } |
3924 | 3930 | ||
3925 | /// <summary> | 3931 | /// <summary> |
@@ -3930,7 +3936,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3930 | /// <returns></returns> | 3936 | /// <returns></returns> |
3931 | public List<ScenePresence> GetScenePresences(FilterAvatarList filter) | 3937 | public List<ScenePresence> GetScenePresences(FilterAvatarList filter) |
3932 | { | 3938 | { |
3933 | return m_innerScene.GetScenePresences(filter); | 3939 | return m_sceneGraph.GetScenePresences(filter); |
3934 | } | 3940 | } |
3935 | 3941 | ||
3936 | /// <summary> | 3942 | /// <summary> |
@@ -3940,7 +3946,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3940 | /// <returns></returns> | 3946 | /// <returns></returns> |
3941 | public ScenePresence GetScenePresence(UUID avatarID) | 3947 | public ScenePresence GetScenePresence(UUID avatarID) |
3942 | { | 3948 | { |
3943 | return m_innerScene.GetScenePresence(avatarID); | 3949 | return m_sceneGraph.GetScenePresence(avatarID); |
3944 | } | 3950 | } |
3945 | 3951 | ||
3946 | /// <summary> | 3952 | /// <summary> |
@@ -4005,7 +4011,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
4005 | /// <returns></returns> | 4011 | /// <returns></returns> |
4006 | public SceneObjectPart GetSceneObjectPart(string name) | 4012 | public SceneObjectPart GetSceneObjectPart(string name) |
4007 | { | 4013 | { |
4008 | return m_innerScene.GetSceneObjectPart(name); | 4014 | return m_sceneGraph.GetSceneObjectPart(name); |
4009 | } | 4015 | } |
4010 | 4016 | ||
4011 | /// <summary> | 4017 | /// <summary> |
@@ -4015,7 +4021,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
4015 | /// <returns></returns> | 4021 | /// <returns></returns> |
4016 | public SceneObjectPart GetSceneObjectPart(uint localID) | 4022 | public SceneObjectPart GetSceneObjectPart(uint localID) |
4017 | { | 4023 | { |
4018 | return m_innerScene.GetSceneObjectPart(localID); | 4024 | return m_sceneGraph.GetSceneObjectPart(localID); |
4019 | } | 4025 | } |
4020 | 4026 | ||
4021 | /// <summary> | 4027 | /// <summary> |
@@ -4025,22 +4031,22 @@ namespace OpenSim.Region.Environment.Scenes | |||
4025 | /// <returns></returns> | 4031 | /// <returns></returns> |
4026 | public SceneObjectPart GetSceneObjectPart(UUID fullID) | 4032 | public SceneObjectPart GetSceneObjectPart(UUID fullID) |
4027 | { | 4033 | { |
4028 | return m_innerScene.GetSceneObjectPart(fullID); | 4034 | return m_sceneGraph.GetSceneObjectPart(fullID); |
4029 | } | 4035 | } |
4030 | 4036 | ||
4031 | internal bool TryGetAvatar(UUID avatarId, out ScenePresence avatar) | 4037 | internal bool TryGetAvatar(UUID avatarId, out ScenePresence avatar) |
4032 | { | 4038 | { |
4033 | return m_innerScene.TryGetAvatar(avatarId, out avatar); | 4039 | return m_sceneGraph.TryGetAvatar(avatarId, out avatar); |
4034 | } | 4040 | } |
4035 | 4041 | ||
4036 | internal bool TryGetAvatarByName(string avatarName, out ScenePresence avatar) | 4042 | internal bool TryGetAvatarByName(string avatarName, out ScenePresence avatar) |
4037 | { | 4043 | { |
4038 | return m_innerScene.TryGetAvatarByName(avatarName, out avatar); | 4044 | return m_sceneGraph.TryGetAvatarByName(avatarName, out avatar); |
4039 | } | 4045 | } |
4040 | 4046 | ||
4041 | internal void ForEachClient(Action<IClientAPI> action) | 4047 | internal void ForEachClient(Action<IClientAPI> action) |
4042 | { | 4048 | { |
4043 | m_innerScene.ForEachClient(action); | 4049 | m_sceneGraph.ForEachClient(action); |
4044 | } | 4050 | } |
4045 | 4051 | ||
4046 | /// <summary> | 4052 | /// <summary> |
@@ -4050,7 +4056,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
4050 | /// <returns></returns> | 4056 | /// <returns></returns> |
4051 | public List<EntityBase> GetEntities() | 4057 | public List<EntityBase> GetEntities() |
4052 | { | 4058 | { |
4053 | return m_innerScene.GetEntities(); | 4059 | return m_sceneGraph.GetEntities(); |
4054 | } | 4060 | } |
4055 | 4061 | ||
4056 | #endregion | 4062 | #endregion |
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/SceneGraph.cs index c8f4a72..ab0ec1f 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/SceneGraph.cs | |||
@@ -39,7 +39,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
39 | { | 39 | { |
40 | public delegate void PhysicsCrash(); | 40 | public delegate void PhysicsCrash(); |
41 | 41 | ||
42 | public class InnerScene | 42 | /// <summary> |
43 | /// This class used to be called InnerScene and may not yet truly be a SceneGraph. The non scene graph components | ||
44 | /// should be migrated out over time. | ||
45 | /// </summary> | ||
46 | public class SceneGraph | ||
43 | { | 47 | { |
44 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 49 | ||
@@ -77,7 +81,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
77 | 81 | ||
78 | #endregion | 82 | #endregion |
79 | 83 | ||
80 | protected internal InnerScene(Scene parent, RegionInfo regInfo) | 84 | protected internal SceneGraph(Scene parent, RegionInfo regInfo) |
81 | { | 85 | { |
82 | m_parentScene = parent; | 86 | m_parentScene = parent; |
83 | m_regInfo = regInfo; | 87 | m_regInfo = regInfo; |
@@ -1698,6 +1702,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1698 | } | 1702 | } |
1699 | return null; | 1703 | return null; |
1700 | } | 1704 | } |
1705 | |||
1701 | /// <summary> | 1706 | /// <summary> |
1702 | /// Calculates the distance between two Vector3s | 1707 | /// Calculates the distance between two Vector3s |
1703 | /// </summary> | 1708 | /// </summary> |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index f5c5838..4f00843 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -1051,13 +1051,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
1051 | scriptScore = 0; | 1051 | scriptScore = 0; |
1052 | 1052 | ||
1053 | scriptScore += (float)count; | 1053 | scriptScore += (float)count; |
1054 | InnerScene d = m_scene.m_innerScene; | 1054 | SceneGraph d = m_scene.m_sceneGraph; |
1055 | d.AddToScriptLPS(count); | 1055 | d.AddToScriptLPS(count); |
1056 | } | 1056 | } |
1057 | 1057 | ||
1058 | public void AddActiveScriptCount(int count) | 1058 | public void AddActiveScriptCount(int count) |
1059 | { | 1059 | { |
1060 | InnerScene d = m_scene.m_innerScene; | 1060 | SceneGraph d = m_scene.m_sceneGraph; |
1061 | d.AddActiveScripts(count); | 1061 | d.AddActiveScripts(count); |
1062 | } | 1062 | } |
1063 | 1063 | ||
@@ -1672,7 +1672,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1672 | 1672 | ||
1673 | public void QueueForUpdateCheck() | 1673 | public void QueueForUpdateCheck() |
1674 | { | 1674 | { |
1675 | m_scene.m_innerScene.AddToUpdateList(this); | 1675 | m_scene.m_sceneGraph.AddToUpdateList(this); |
1676 | } | 1676 | } |
1677 | 1677 | ||
1678 | /// <summary> | 1678 | /// <summary> |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index bfd210e..af17fac 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -2483,7 +2483,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2483 | foreach (SceneObjectGroup grp in m_attachments) | 2483 | foreach (SceneObjectGroup grp in m_attachments) |
2484 | { | 2484 | { |
2485 | // ControllingClient may be null at this point! | 2485 | // ControllingClient may be null at this point! |
2486 | m_scene.m_innerScene.DetachSingleAttachmentToInv(grp.GetFromAssetID(), ControllingClient); | 2486 | m_scene.m_sceneGraph.DetachSingleAttachmentToInv(grp.GetFromAssetID(), ControllingClient); |
2487 | } | 2487 | } |
2488 | } | 2488 | } |
2489 | catch (InvalidOperationException) | 2489 | catch (InvalidOperationException) |
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs index 3575a51..f104632 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Region.Physics.Manager | |||
40 | { | 40 | { |
41 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 41 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
42 | 42 | ||
43 | // The only thing that should register for this event is the InnerScene | 43 | // The only thing that should register for this event is the SceneGraph |
44 | // Anything else could cause problems. | 44 | // Anything else could cause problems. |
45 | 45 | ||
46 | public event physicsCrash OnPhysicsCrash; | 46 | public event physicsCrash OnPhysicsCrash; |