Examples of PackBits()


Examples of com.ngt.jopenmetaverse.shared.protocol.BitPack.PackBits()

              header.Type = type;

              // Should be enough to fit even the most poorly packed data
              byte[] data = new byte[patches.length * 16 * 16 * 2];
              BitPack bitpack = new BitPack(data, 0);
              bitpack.PackBits(header.Stride, 16);
              bitpack.PackBits(header.PatchSize, 8);
              bitpack.PackBits((int)header.Type.getIndex(), 8);

              for (int i = 0; i < patches.length; i++)
                  CreatePatch(bitpack, patches[i].Data, patches[i].X, patches[i].Y);
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.protocol.BitPack.PackBits()

              // Should be enough to fit even the most poorly packed data
              byte[] data = new byte[patches.length * 16 * 16 * 2];
              BitPack bitpack = new BitPack(data, 0);
              bitpack.PackBits(header.Stride, 16);
              bitpack.PackBits(header.PatchSize, 8);
              bitpack.PackBits((int)header.Type.getIndex(), 8);

              for (int i = 0; i < patches.length; i++)
                  CreatePatch(bitpack, patches[i].Data, patches[i].X, patches[i].Y);

View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.protocol.BitPack.PackBits()

              // Should be enough to fit even the most poorly packed data
              byte[] data = new byte[patches.length * 16 * 16 * 2];
              BitPack bitpack = new BitPack(data, 0);
              bitpack.PackBits(header.Stride, 16);
              bitpack.PackBits(header.PatchSize, 8);
              bitpack.PackBits((int)header.Type.getIndex(), 8);

              for (int i = 0; i < patches.length; i++)
                  CreatePatch(bitpack, patches[i].Data, patches[i].X, patches[i].Y);

              bitpack.PackBits(END_OF_PATCHES, 8);
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.protocol.BitPack.PackBits()

              bitpack.PackBits((int)header.Type.getIndex(), 8);

              for (int i = 0; i < patches.length; i++)
                  CreatePatch(bitpack, patches[i].Data, patches[i].X, patches[i].Y);

              bitpack.PackBits(END_OF_PATCHES, 8);

              layer.LayerData.Data = new byte[bitpack.getBytePos() + 1];
//              Buffer.BlockCopy(bitpack.Data, 0, layer.LayerData.Data, 0, bitpack.getBytePos() + 1);
              Utils.arraycopy(bitpack.Data, 0, layer.LayerData.Data, 0, bitpack.getBytePos() + 1);
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.protocol.BitPack.PackBits()

              header.PatchSize = 16;
              header.Type = TerrainPatch.LayerType.Land;

              byte[] data = new byte[1536];
              BitPack bitpack = new BitPack(data, 0);
              bitpack.PackBits(header.Stride, 16);
              bitpack.PackBits(header.PatchSize, 8);
              bitpack.PackBits((int)header.Type.getIndex(), 8);

              for (int i = 0; i < patches.length; i++)
                  CreatePatchFromHeightmap(bitpack, heightmap, patches[i] % 16, (patches[i] - (patches[i] % 16)) / 16);
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.protocol.BitPack.PackBits()

              header.Type = TerrainPatch.LayerType.Land;

              byte[] data = new byte[1536];
              BitPack bitpack = new BitPack(data, 0);
              bitpack.PackBits(header.Stride, 16);
              bitpack.PackBits(header.PatchSize, 8);
              bitpack.PackBits((int)header.Type.getIndex(), 8);

              for (int i = 0; i < patches.length; i++)
                  CreatePatchFromHeightmap(bitpack, heightmap, patches[i] % 16, (patches[i] - (patches[i] % 16)) / 16);
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.protocol.BitPack.PackBits()

              byte[] data = new byte[1536];
              BitPack bitpack = new BitPack(data, 0);
              bitpack.PackBits(header.Stride, 16);
              bitpack.PackBits(header.PatchSize, 8);
              bitpack.PackBits((int)header.Type.getIndex(), 8);

              for (int i = 0; i < patches.length; i++)
                  CreatePatchFromHeightmap(bitpack, heightmap, patches[i] % 16, (patches[i] - (patches[i] % 16)) / 16);

              bitpack.PackBits(END_OF_PATCHES, 8);
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.protocol.BitPack.PackBits()

              bitpack.PackBits((int)header.Type.getIndex(), 8);

              for (int i = 0; i < patches.length; i++)
                  CreatePatchFromHeightmap(bitpack, heightmap, patches[i] % 16, (patches[i] - (patches[i] % 16)) / 16);

              bitpack.PackBits(END_OF_PATCHES, 8);

              layer.LayerData.Data = new byte[bitpack.getBytePos() + 1];
              Utils.arraycopy(bitpack.Data, 0, layer.LayerData.Data, 0, bitpack.getBytePos() + 1);

              return layer;
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.protocol.BitPack.PackBits()

              header.PatchSize = 16;
              header.Type = TerrainPatch.LayerType.Land;

              byte[] data = new byte[1536];
              BitPack bitpack = new BitPack(data, 0);
              bitpack.PackBits(header.Stride, 16);
              bitpack.PackBits(header.PatchSize, 8);
              bitpack.PackBits((int)header.Type.getIndex(), 8);

              CreatePatch(bitpack, patchData, x, y);
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.protocol.BitPack.PackBits()

              header.Type = TerrainPatch.LayerType.Land;

              byte[] data = new byte[1536];
              BitPack bitpack = new BitPack(data, 0);
              bitpack.PackBits(header.Stride, 16);
              bitpack.PackBits(header.PatchSize, 8);
              bitpack.PackBits((int)header.Type.getIndex(), 8);

              CreatePatch(bitpack, patchData, x, y);

              bitpack.PackBits(END_OF_PATCHES, 8);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.