From 91a9f30b1613fba8c3ff31de5b9390b0e636ad65 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 20 May 2011 23:34:34 +0100 Subject: implement Scene.GetSceneObjectGroup(UUID fullID) using existing index --- OpenSim/Region/Framework/Scenes/Scene.cs | 10 ++++++++++ OpenSim/Region/Framework/Scenes/SceneGraph.cs | 16 ++++++++++++++++ 2 files changed, 26 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 0722cee..f718331 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4279,6 +4279,16 @@ namespace OpenSim.Region.Framework.Scenes // } /// + /// Get a group via its UUID + /// + /// + /// + public SceneObjectGroup GetSceneObjectGroup(UUID fullID) + { + return m_sceneGraph.GetSceneObjectGroup(fullID); + } + + /// /// Get a named prim contained in this scene (will return the first /// found, if there are more than one prim with the same name) /// diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 14b587f..2d547f7 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -976,6 +976,22 @@ namespace OpenSim.Region.Framework.Scenes } /// + /// Get a group in the scene + /// + /// UUID of the group + /// null if no such group was found + protected internal SceneObjectGroup GetSceneObjectGroup(UUID fullID) + { + lock (SceneObjectGroupsByFullID) + { + if (SceneObjectGroupsByFullID.ContainsKey(fullID)) + return SceneObjectGroupsByFullID[fullID]; + } + + return null; + } + + /// /// Get a part contained in this scene. /// /// -- cgit v1.1