Static helper functions and global variables
コード例 #1
0
        public string GetSerializedAttachmentPrims(Simulator sim, uint localID)
        {
            List <Primitive> prims = sim.ObjectsPrimitives.FindAll(
                delegate(Primitive prim)
            {
                return(prim.LocalID == localID || prim.ParentID == localID);
            }
                );

            RequestObjectProperties(prims, 500);

            int i = prims.FindIndex(
                delegate(Primitive prim)
            {
                return(prim.LocalID == localID);
            }
                );

            if (i >= 0)
            {
                prims[i].ParentID = 0;
            }

            return(OSDParser.SerializeLLSDXmlString(ClientHelpers.PrimListToOSD(prims)));
        }
コード例 #2
0
        public string GetSerializedPrims(Simulator sim, uint localID)
        {
            Primitive p;

            sim.ObjectsPrimitives.TryGetValue(localID, out p);

            if (p == null)
            {
                return("");
            }

            uint rootPrim = p.ParentID == 0 ? p.LocalID : p.ParentID;

            List <Primitive> prims = sim.ObjectsPrimitives.FindAll(
                prim => (prim.LocalID == rootPrim || prim.ParentID == rootPrim)
                );

            RequestObjectProperties(prims, 500);

            return(OSDParser.SerializeLLSDXmlString(ClientHelpers.PrimListToOSD(prims)));
        }
コード例 #3
0
        public bool CreateObjectFromXml(string xml)
        {
            List <Primitive> prims = ClientHelpers.OSDToPrimList(OSDParser.DeserializeLLSDXml(xml));

            return(CreateObject(prims));
        }