From 91a9f30b1613fba8c3ff31de5b9390b0e636ad65 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 20 May 2011 23:34:34 +0100 Subject: [PATCH] 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(+) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 0722cee7bd..f718331ec1 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4278,6 +4278,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 14b587fbd1..2d547f7926 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -975,6 +975,22 @@ namespace OpenSim.Region.Framework.Scenes return result; } + /// + /// 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. ///