Package com.ngt.jopenmetaverse.shared.types

Examples of com.ngt.jopenmetaverse.shared.types.UUID


        public UUID UnpackUUID()
        {
            if (bitPos != 0) throw new IndexOutOfBoundsException();

            UUID val = new UUID(Data, bytePos);
            bytePos += 16;
            return val;
        }
View Full Code Here


      r.isMask = cachedData[i++] == 1;
     
      int uncompressedSize = Utils.bytesToInt(cachedData, i);
      i += 4;

      textureID = new UUID(cachedData, i);
      i += 16;

//      r.data = new byte[uncompressedSize];
      ByteArrayOutputStream out = new ByteArrayOutputStream();
      ByteArrayInputStream compressed = new ByteArrayInputStream(cachedData, i,  cachedData.length - i);
View Full Code Here

        if ((bakedIndex == (int)BakeType.Skirt.getIndex())
            && !Wearables.containsKey(WearableType.Skirt))
          continue;

        // Build a hash of all the texture asset IDs in this baking layer
        UUID hash = UUID.Zero;
        for (int wearableIndex = 0; wearableIndex < WEARABLES_PER_LAYER; wearableIndex++)
        {
          WearableType type = WEARABLE_BAKE_MAP[bakedIndex][wearableIndex];

          WearableData wearable;
          if (type != WearableType.Invalid
              && (wearable = Wearables.get(type))!=null)
            hash = UUID.xor(hash, wearable.AssetID);
        }

        if (!hash.equals(UUID.Zero))
        {
          // Hash with our secret value for this baked layer
          hash = UUID.xor(hash,  BAKED_TEXTURE_HASH[bakedIndex]);

          // Add this to the list of hashes to send out
View Full Code Here

    {
      List<UUID> layerTextureIDs = GetTextureDownloadList(bakeLayers.get(i));

      for (int j = 0; j < layerTextureIDs.size(); j++)
      {
        UUID uuid = layerTextureIDs.get(j);
        if (!textureIDs.contains(uuid))
          textureIDs.add(uuid);
      }
    }
View Full Code Here

    long start = Utils.getUnixTime();
    JLogger.debug("Going to oven.Bake..");
    oven.Bake();
    JLogger.debug("Task Baking " + bakeType + " took " + (Utils.getUnixTime() - start) + "ms");

    UUID newAssetID = UUID.Zero;
    int retries = UPLOAD_RETRIES;

    while (newAssetID.equals(UUID.Zero) && retries > 0)
    {
      newAssetID = UploadBake(oven.getBakedTexture().AssetData);
      --retries;
    }

    Textures[(int)BakeTypeToAgentTextureIndex(bakeType).getIndex()].TextureID = newAssetID;

    if (newAssetID.equals(UUID.Zero))
    {
      JLogger.warn("Failed uploading bake " + bakeType);
      return false;
    }
View Full Code Here

    MethodDelegate<Void, BakedTextureUploadedCallbackArgs> bakedTextureUploadedCallback
    = new MethodDelegate<Void, BakedTextureUploadedCallbackArgs>()
    {
      public Void execute(
          BakedTextureUploadedCallbackArgs e) {
        UUID newAssetID = e.getNewAssetID();
        bakeID[0] = newAssetID;
        uploadEvent.set();
        return null;
      }
View Full Code Here

      set.WearableData = new AgentSetAppearancePacket.WearableDataBlock[BAKED_TEXTURE_COUNT];

      // Build hashes for each of the bake layers from the individual components
      for (int bakedIndex = 0; bakedIndex < BAKED_TEXTURE_COUNT; bakedIndex++)
      {
        UUID hash = UUID.Zero;

        for (int wearableIndex = 0; wearableIndex < WEARABLES_PER_LAYER; wearableIndex++)
        {
          WearableType type = WEARABLE_BAKE_MAP[bakedIndex][wearableIndex];

          WearableData wearable;
          if (type != WearableType.Invalid && ((wearable = Wearables.get(type))!=null))
            hash = UUID.xor(hash, wearable.AssetID);
        }

        if (!hash.equals(UUID.Zero))
        {
          // Hash with our magic value for this baked layer
          hash = UUID.xor(hash,  BAKED_TEXTURE_HASH[bakedIndex]);
        }
View Full Code Here

        /// <param name="pos"></param>
        public SculptData(byte[] data, int pos)
        {
            if (data.length >= 17)
            {
                SculptTexture = new UUID(data, pos);
                type = data[pos + 16];
            }
            else
            {
                SculptTexture = UUID.Zero;
View Full Code Here

//                sb.append(String.format("\nTextureEntry FromBytes: \n%s", Utils.bytesToHexDebugString(ArrayUtils.subarray(data, i[0], data.length),  "")));

               
                //region Texture
                DefaultTexture.setTextureID(new UUID(data, i[0]));
                i[0] += 16;
               
                while (ReadFaceBitfield(data, i, faceBits, bitfieldSize))
                {
                    UUID tmpUUID = new UUID(data, i[0]);
                    i[0] += 16;

                    for (long face = 0, bit = 1; face < bitfieldSize[0]; face++, bit <<= 1)
                        if ((faceBits[0] & bit) != 0)
                            CreateFace((int)face).setTextureID(tmpUUID);
View Full Code Here

        /// </summary>
        /// <param name="fromAgentID">agentID of avatatar to form friendship with</param>
        /// <param name="imSessionID">imSessionID of the friendship request message</param>
        public void AcceptFriendship(UUID fromAgentID, UUID imSessionID) throws InventoryException
        {
          UUID callingCardFolder = Client.inventory.FindFolderForType(AssetType.CallingCard);

            AcceptFriendshipPacket request = new AcceptFriendshipPacket();
            request.AgentData.AgentID = Client.self.getAgentID();
            request.AgentData.SessionID = Client.self.getSessionID();
            request.TransactionBlock.TransactionID = imSessionID;
View Full Code Here

TOP

Related Classes of com.ngt.jopenmetaverse.shared.types.UUID

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.