implement Scene.GetSceneObjectGroup(UUID fullID) using existing index

bulletsim
Justin Clark-Casey (justincc) 2011-05-20 23:34:34 +01:00
parent 7ed419217f
commit 91a9f30b16
2 changed files with 26 additions and 0 deletions

View File

@ -4278,6 +4278,16 @@ namespace OpenSim.Region.Framework.Scenes
// } // }
// } // }
/// <summary>
/// Get a group via its UUID
/// </summary>
/// <param name="fullID"></param>
/// <returns></returns>
public SceneObjectGroup GetSceneObjectGroup(UUID fullID)
{
return m_sceneGraph.GetSceneObjectGroup(fullID);
}
/// <summary> /// <summary>
/// Get a named prim contained in this scene (will return the first /// Get a named prim contained in this scene (will return the first
/// found, if there are more than one prim with the same name) /// found, if there are more than one prim with the same name)

View File

@ -975,6 +975,22 @@ namespace OpenSim.Region.Framework.Scenes
return result; return result;
} }
/// <summary>
/// Get a group in the scene
/// </summary>
/// <param name="fullID">UUID of the group</param>
/// <returns>null if no such group was found</returns>
protected internal SceneObjectGroup GetSceneObjectGroup(UUID fullID)
{
lock (SceneObjectGroupsByFullID)
{
if (SceneObjectGroupsByFullID.ContainsKey(fullID))
return SceneObjectGroupsByFullID[fullID];
}
return null;
}
/// <summary> /// <summary>
/// Get a part contained in this scene. /// Get a part contained in this scene.
/// </summary> /// </summary>