Examples of readByteArray()


Examples of com.jme3.export.InputCapsule.readByteArray()

        this.numVertices = capsule.readInt(MeshCollisionShape.NUM_VERTICES, 0);
        this.numTriangles = capsule.readInt(MeshCollisionShape.NUM_TRIANGLES, 0);
        this.vertexStride = capsule.readInt(MeshCollisionShape.VERTEX_STRIDE, 0);
        this.triangleIndexStride = capsule.readInt(MeshCollisionShape.TRIANGLE_INDEX_STRIDE, 0);

        this.triangleIndexBase = BufferUtils.createByteBuffer(capsule.readByteArray(MeshCollisionShape.TRIANGLE_INDEX_BASE, null));
        this.vertexBase = BufferUtils.createByteBuffer(capsule.readByteArray(MeshCollisionShape.VERTEX_BASE, null));

        byte[] nativeBvh = capsule.readByteArray(MeshCollisionShape.NATIVE_BVH, null);
        if (nativeBvh == null) {
            // Either using non memory optimized BVH or old J3O file
View Full Code Here

Examples of com.jme3.export.InputCapsule.readByteArray()

        this.numTriangles = capsule.readInt(MeshCollisionShape.NUM_TRIANGLES, 0);
        this.vertexStride = capsule.readInt(MeshCollisionShape.VERTEX_STRIDE, 0);
        this.triangleIndexStride = capsule.readInt(MeshCollisionShape.TRIANGLE_INDEX_STRIDE, 0);

        this.triangleIndexBase = BufferUtils.createByteBuffer(capsule.readByteArray(MeshCollisionShape.TRIANGLE_INDEX_BASE, null));
        this.vertexBase = BufferUtils.createByteBuffer(capsule.readByteArray(MeshCollisionShape.VERTEX_BASE, null));

        byte[] nativeBvh = capsule.readByteArray(MeshCollisionShape.NATIVE_BVH, null);
        if (nativeBvh == null) {
            // Either using non memory optimized BVH or old J3O file
            memoryOptimized = false;
View Full Code Here

Examples of com.jme3.export.InputCapsule.readByteArray()

        this.triangleIndexStride = capsule.readInt(MeshCollisionShape.TRIANGLE_INDEX_STRIDE, 0);

        this.triangleIndexBase = BufferUtils.createByteBuffer(capsule.readByteArray(MeshCollisionShape.TRIANGLE_INDEX_BASE, null));
        this.vertexBase = BufferUtils.createByteBuffer(capsule.readByteArray(MeshCollisionShape.VERTEX_BASE, null));

        byte[] nativeBvh = capsule.readByteArray(MeshCollisionShape.NATIVE_BVH, null);
        if (nativeBvh == null) {
            // Either using non memory optimized BVH or old J3O file
            memoryOptimized = false;
            createShape(true);
        } else {
View Full Code Here

Examples of com.jme3.export.InputCapsule.readByteArray()

        numVertices = capsule.readInt("numVertices", 0);
        numTriangles = capsule.readInt("numTriangles", 0);
        vertexStride = capsule.readInt("vertexStride", 0);
        triangleIndexStride = capsule.readInt("triangleIndexStride", 0);

        triangleIndexBase = ByteBuffer.wrap(capsule.readByteArray("triangleIndexBase", new byte[0]));
        vertexBase = ByteBuffer.wrap(capsule.readByteArray("vertexBase", new byte[0]));
        createShape();
    }

    protected void createShape() {
View Full Code Here

Examples of com.jme3.export.InputCapsule.readByteArray()

        numTriangles = capsule.readInt("numTriangles", 0);
        vertexStride = capsule.readInt("vertexStride", 0);
        triangleIndexStride = capsule.readInt("triangleIndexStride", 0);

        triangleIndexBase = ByteBuffer.wrap(capsule.readByteArray("triangleIndexBase", new byte[0]));
        vertexBase = ByteBuffer.wrap(capsule.readByteArray("vertexBase", new byte[0]));
        createShape();
    }

    protected void createShape() {
//        bulletMesh = new IndexedMesh();
View Full Code Here

Examples of org.apache.sanselan.common.BinaryInputStream.readByteArray()

    BinaryInputStream bis = new BinaryInputStream(bytes, APP13_BYTE_ORDER);

    // Note that these are unsigned quantities. Name is always an even
    // number of bytes (including the 1st byte, which is the size.)

    byte[] idString = bis.readByteArray(
        PHOTOSHOP_IDENTIFICATION_STRING.length,
        "App13 Segment missing identification string");
    if (!compareByteArrays(idString, PHOTOSHOP_IDENTIFICATION_STRING))
      throw new ImageReadException("Not a Photoshop App13 Segment");
View Full Code Here

Examples of org.apache.sanselan.common.BinaryInputStream.readByteArray()

    // int index = PHOTOSHOP_IDENTIFICATION_STRING.length;

    while (true)
    {
      byte[] imageResourceBlockSignature = bis
          .readByteArray(CONST_8BIM.length,
              "App13 Segment missing identification string",
              false, false);
      if (null == imageResourceBlockSignature)
        break;
View Full Code Here

Examples of org.apache.sanselan.common.BinaryInputStream.readByteArray()

      {
        bis.read1ByteInteger("Image Resource Block has invalid name");
        blockNameBytes = new byte[0];
      } else
      {
        blockNameBytes = bis.readByteArray(blockNameLength,
            "Invalid Image Resource Block name", verbose, strict);
        if (null == blockNameBytes)
          break;

        if (blockNameLength % 2 == 0)
View Full Code Here

Examples of org.apache.sanselan.common.BinaryInputStream.readByteArray()

          .read4ByteInteger("Image Resource Block missing size");
      if (verbose)
        Debug.debug("blockSize", blockSize + " (0x"
            + Integer.toHexString(blockSize) + ")");

      byte[] blockData = bis.readByteArray(blockSize,
          "Invalid Image Resource Block data", verbose, strict);
      if (null == blockData)
        break;

      blocks.add(new IPTCBlock(blockType, blockNameBytes, blockData));
View Full Code Here

Examples of org.apache.sanselan.common.BinaryInputStream.readByteArray()

        BinaryInputStream bis = new BinaryInputStream(bytes, APP13_BYTE_ORDER);

        // Note that these are unsigned quantities. Name is always an even
        // number of bytes (including the 1st byte, which is the size.)

        byte[] idString = bis.readByteArray(
                PHOTOSHOP_IDENTIFICATION_STRING.length,
                "App13 Segment missing identification string");
        if (!compareByteArrays(idString, PHOTOSHOP_IDENTIFICATION_STRING))
            throw new ImageReadException("Not a Photoshop App13 Segment");
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.