public LLSD ToLLSD(int faceNumber) { LLSDMap tex = new LLSDMap(10); if (faceNumber >= 0) { tex["face_number"] = LLSD.FromInteger(faceNumber); } tex["colors"] = RGBA.ToLLSD(); tex["scales"] = LLSD.FromReal(RepeatU); tex["scalet"] = LLSD.FromReal(RepeatV); tex["offsets"] = LLSD.FromReal(OffsetU); tex["offsett"] = LLSD.FromReal(OffsetV); tex["imagerot"] = LLSD.FromReal(Rotation); tex["bump"] = LLSD.FromInteger((int)Bump); tex["shiny"] = LLSD.FromInteger((int)Shiny); tex["fullbright"] = LLSD.FromBoolean(Fullbright); tex["media_flags"] = LLSD.FromInteger(Convert.ToInt32(MediaFlags)); tex["mapping"] = LLSD.FromInteger((int)TexMapType); tex["glow"] = LLSD.FromReal(Glow); if (TextureID != LLObject.TextureEntry.WHITE_TEXTURE) { tex["imageid"] = LLSD.FromUUID(TextureID); } else { tex["imageid"] = LLSD.FromUUID(LLUUID.Zero); } return(tex); }