Java Utililty Methods FloatBuffer Copy

List of utility methods to do FloatBuffer Copy

Description

The list of methods to do FloatBuffer Copy are organized into topic(s).

Method

voidcopy(final FloatBuffer source, final int fromPos, final FloatBuffer destination, final int toPos, final int length)
Copies floats from one buffer to another.
final int oldLimit = source.limit();
source.position(fromPos);
source.limit(fromPos + length);
destination.position(toPos);
destination.put(source);
source.limit(oldLimit);
voidcopy(float[] vertices, FloatBuffer floatBuffer, int numFloats, int offset)
copy
floatBuffer.position(0);
floatBuffer.limit(numFloats);
for (int index = 0; index < numFloats; index++)
    floatBuffer.put(vertices[index + offset]);
floatBuffer.position(0);
FloatBuffercopyFloatBuffer(FloatBuffer buf)
copy Float Buffer
return copyFloatBufferAsByteBuffer(buf).asFloatBuffer();
voidcopyInternal(FloatBuffer buf, int fromPos, int toPos, int length)
Copies floats from one position in the buffer to another.
float[] data = new float[length];
buf.position(fromPos);
buf.get(data);
buf.position(toPos);
buf.put(data);
voidcopyInternalVector2(final FloatBuffer buf, final int fromPos, final int toPos)
copy Internal Vector
copyInternal(buf, fromPos * 2, toPos * 2, 2);
voidcopyInternalVector3(FloatBuffer buf, int fromPos, int toPos)
Copies a Vector3f from one position in the buffer to another.
copyInternal(buf, fromPos * 3, toPos * 3, 3);