OpenSim.Region.Framework.Scenes.Scene.GetGroupByPrim C# (CSharp) Method

GetGroupByPrim() public method

Get a scene object group that contains the prim with the given local id
public GetGroupByPrim ( uint localID ) : SceneObjectGroup
localID uint
return SceneObjectGroup
        public SceneObjectGroup GetGroupByPrim(uint localID)
        {
            return m_sceneGraph.GetGroupByPrim(localID);
        }

Usage Example

Ejemplo n.º 1
0
        private double GetPriorityByDistance(IClientAPI client, ISceneEntity entity)
        {
            ScenePresence presence = m_scene.GetScenePresence(client.AgentId);

            if (presence != null)
            {
                // If this is an update for our own avatar give it the highest priority
                if (presence == entity)
                {
                    return(0.0);
                }

                // Use the camera position for local agents and avatar position for remote agents
                Vector3 presencePos = (presence.IsChildAgent) ?
                                      presence.AbsolutePosition :
                                      presence.CameraPosition;

                // Use group position for child prims
                Vector3 entityPos;
                if (entity is SceneObjectPart)
                {
                    entityPos = m_scene.GetGroupByPrim(entity.LocalId).AbsolutePosition;
                }
                else
                {
                    entityPos = entity.AbsolutePosition;
                }

                return(Vector3.DistanceSquared(presencePos, entityPos));
            }

            return(double.NaN);
        }
All Usage Examples Of OpenSim.Region.Framework.Scenes.Scene::GetGroupByPrim
Scene