Package java.nio

Examples of java.nio.DoubleBuffer.position()


            cs.setOrdinate(t, 1, ordinates[t * 2 + 1]);
        }
       
        if (dimensions > 2) {
            // z
            dbuffer.position(dbuffer.position() + 2);
            dbuffer.get(ordinates, 0, numPoints);

            for (int t = 0; t < numPoints; t++) {
                cs.setOrdinate(t, 2, ordinates[t]);
            }
View Full Code Here


            cs.setOrdinate(t, 1, ordinates[t * 2 + 1]);
        }
       
        if (dimensions > 2) {
            // z
            dbuffer.position(dbuffer.position() + 2);
            dbuffer.get(ordinates, 0, numPoints);

            for (int t = 0; t < numPoints; t++) {
                cs.setOrdinate(t, 2, ordinates[t]);
            }
View Full Code Here

    LongBuffer lBuffer = buffer.asLongBuffer();
    lBuffer.position(1);
    System.out.println(Memory.getPosition(lBuffer));
   
    DoubleBuffer dBuffer = buffer.asDoubleBuffer();
    dBuffer.position(1);
    System.out.println(Memory.getPosition(dBuffer));
  }
}
View Full Code Here

    if (dst instanceof ByteBuffer)
      buffer = ((ByteBuffer)dst).asDoubleBuffer();
    else if (dst instanceof DoubleBuffer) buffer = (DoubleBuffer)dst;
    if (buffer == null) throw new GdxRuntimeException("dst must be a ByteBuffer or DoubleBuffer");

    int oldPosition = buffer.position();
    buffer.put(src, srcOffset, numElements);
    buffer.position(oldPosition);
    buffer.limit(oldPosition + numElements);
  }
 
View Full Code Here

    else if (dst instanceof DoubleBuffer) buffer = (DoubleBuffer)dst;
    if (buffer == null) throw new GdxRuntimeException("dst must be a ByteBuffer or DoubleBuffer");

    int oldPosition = buffer.position();
    buffer.put(src, srcOffset, numElements);
    buffer.position(oldPosition);
    buffer.limit(oldPosition + numElements);
  }
 
  /** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} instance's
   * {@link Buffer#position()} is used to define the offset into the Buffer itself. The position and limit will stay the same.
View Full Code Here

    if (dst instanceof ByteBuffer)
      buffer = ((ByteBuffer)dst).asDoubleBuffer();
    else if (dst instanceof DoubleBuffer) buffer = (DoubleBuffer)dst;
    if (buffer == null) throw new GdxRuntimeException("dst must be a ByteBuffer or DoubleBuffer");

    int oldPosition = buffer.position();
    buffer.put(src, srcOffset, numElements);
    buffer.position(oldPosition);
  }
 
// /** Copies the contents of src to dst, starting from the current position of src, copying numElements elements (using the data
View Full Code Here

    else if (dst instanceof DoubleBuffer) buffer = (DoubleBuffer)dst;
    if (buffer == null) throw new GdxRuntimeException("dst must be a ByteBuffer or DoubleBuffer");

    int oldPosition = buffer.position();
    buffer.put(src, srcOffset, numElements);
    buffer.position(oldPosition);
  }
 
// /** Copies the contents of src to dst, starting from the current position of src, copying numElements elements (using the data
// * type of src, no matter the datatype of dst). The dst {@link Buffer#position()} is used as the writing offset. The position
// * of both Buffers will stay the same. The limit of the src Buffer will stay the same. The limit of the dst Buffer will be set
View Full Code Here

    if (dst instanceof ByteBuffer)
      buffer = ((ByteBuffer)dst).asDoubleBuffer();
    else if (dst instanceof DoubleBuffer) buffer = (DoubleBuffer)dst;
    if (buffer == null) throw new GdxRuntimeException("dst must be a ByteBuffer or DoubleBuffer");

    int oldPosition = buffer.position();
    buffer.put(src, srcOffset, numElements);
    buffer.position(oldPosition);
    buffer.limit(oldPosition + numElements);
  }
View Full Code Here

    else if (dst instanceof DoubleBuffer) buffer = (DoubleBuffer)dst;
    if (buffer == null) throw new GdxRuntimeException("dst must be a ByteBuffer or DoubleBuffer");

    int oldPosition = buffer.position();
    buffer.put(src, srcOffset, numElements);
    buffer.position(oldPosition);
    buffer.limit(oldPosition + numElements);
  }

// /** Copies the contents of src to dst, starting from the current position of src, copying numElements elements (using the data
// * type of src, no matter the datatype of dst). The dst {@link Buffer#position()} is used as the writing offset. The position
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.