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

GetScenePresence() public method

Request a scene presence by UUID. Fast, indexed lookup.
public GetScenePresence ( UUID agentID ) : ScenePresence
agentID UUID
return ScenePresence
        public ScenePresence GetScenePresence(UUID agentID)
        {
            return m_sceneGraph.GetScenePresence(agentID);
        }

Same methods

Scene::GetScenePresence ( string firstName, string lastName ) : ScenePresence
Scene::GetScenePresence ( uint localID ) : ScenePresence

Usage Example

        public static ScenePresence AddChildClient(
            Scene scene, LLUDPServer udpServer, UUID agentId, UUID sessionId, uint circuitCode)
        {           
            IPEndPoint testEp = new IPEndPoint(IPAddress.Loopback, 999);

            UseCircuitCodePacket uccp = new UseCircuitCodePacket();

            UseCircuitCodePacket.CircuitCodeBlock uccpCcBlock
                = new UseCircuitCodePacket.CircuitCodeBlock();
            uccpCcBlock.Code = circuitCode;
            uccpCcBlock.ID = agentId;
            uccpCcBlock.SessionID = sessionId;
            uccp.CircuitCode = uccpCcBlock;

            byte[] uccpBytes = uccp.ToBytes();
            UDPPacketBuffer upb = new UDPPacketBuffer(testEp, uccpBytes.Length);
            upb.DataLength = uccpBytes.Length;  // God knows why this isn't set by the constructor.
            Buffer.BlockCopy(uccpBytes, 0, upb.Data, 0, uccpBytes.Length);

            AgentCircuitData acd = new AgentCircuitData();
            acd.AgentID = agentId;
            acd.SessionID = sessionId;

            scene.AuthenticateHandler.AddNewCircuit(circuitCode, acd);

            udpServer.PacketReceived(upb);

            return scene.GetScenePresence(agentId);
        }
All Usage Examples Of OpenSim.Region.Framework.Scenes.Scene::GetScenePresence
Scene