Package com.ngt.jopenmetaverse.shared.sim.imaging

Examples of com.ngt.jopenmetaverse.shared.sim.imaging.Baker


  }
 
  @Test
  public void bakesTests()
  {
    Baker oven = new Baker(BakeType.Head);
    //TODO need to implement
    Baker.LoadResourceLayer("head_hair.tga");
    byte b1 = (byte)0xff;
    byte b2 = (byte)0xff;
    byte b3 = (byte)0xff;
View Full Code Here


  /// <param name="bakeType">Layer to bake</param>
  /// <returns>True on success, otherwise false</returns>
  private boolean CreateBake(BakeType bakeType) throws Exception
  {
    List<AvatarTextureIndex> textureIndices = BakeTypeToTextures(bakeType);
    Baker oven = new Baker(bakeType);

    for (int i = 0; i < textureIndices.size(); i++)
    {
      AvatarTextureIndex textureIndex = textureIndices.get(i);
      TextureData texture = Textures[(int)textureIndex.getIndex()];
      if(texture == null)
        JLogger.warn("Texture is null for index" + textureIndex.getIndex());

      //TODO need to verfy why original code was sending even Zero textures for baking
      if(!texture.TextureID.equals(UUID.Zero))
      {
        JLogger.debug("Adding Texture to oven"  + texture.toString());
        texture.TextureIndex = textureIndex;
        oven.AddTexture(texture);
      }
    }

    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;
View Full Code Here

TOP

Related Classes of com.ngt.jopenmetaverse.shared.sim.imaging.Baker

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.