Android Utililty Methods FloatBuffer Create

List of utility methods to do FloatBuffer Create

Description

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

Method

FloatBuffernewFloatBuffer(int paramInt)
new Float Buffer
ByteBuffer localByteBuffer = newByteBuffer(paramInt * 4);
return localByteBuffer.asFloatBuffer();
FloatBuffertoFloatBuffer(float[] array)
to Float Buffer
ByteBuffer bb = ByteBuffer.allocateDirect(array.length << 2);
bb.order(ByteOrder.nativeOrder());
bb.position(0);
FloatBuffer fbb = bb.asFloatBuffer();
fbb.put(array);
return fbb;
FloatBufferarr2FloatBuffer(float[] arr)
arr Float Buffer
ByteBuffer ibb = ByteBuffer.allocateDirect(arr.length << 2);
ibb.order(ByteOrder.nativeOrder());
FloatBuffer fbb = ibb.asFloatBuffer();
fbb.put(arr);
fbb.position(0);
return fbb;
FloatBufferarr2FloatBuffer(float[] coords)
arr Float Buffer
ByteBuffer ibb = ByteBuffer.allocateDirect(coords.length * 4);
ibb.order(ByteOrder.nativeOrder());
FloatBuffer fbb = ibb.asFloatBuffer();
fbb.put(coords);
fbb.position(0);
return fbb;
FloatBufferfloatToBuffer(float[] a)
float To Buffer
ByteBuffer mbb = ByteBuffer.allocateDirect(a.length * 4);
mbb.order(ByteOrder.nativeOrder());
mBuffer = mbb.asFloatBuffer();
mBuffer.put(a);
mBuffer.position(0);
return mBuffer;
FloatBufferfloatToBuffer(float[] a)
float To Buffer
ByteBuffer mbb = ByteBuffer.allocateDirect(a.length * 4);
mbb.order(ByteOrder.nativeOrder());
FloatBuffer fBuffer = mbb.asFloatBuffer();
fBuffer.put(a);
fBuffer.position(0);
return fBuffer;
FloatBuffersetupFloatBuffer(FloatBuffer preBuffer, float[] array)
setup Float Buffer
if (preBuffer == null || preBuffer.capacity() < array.length) {
    preBuffer = createFloatBuffer(array.length * 2);
} else {
    preBuffer.clear();
preBuffer.put(array);
preBuffer.position(0);
return preBuffer;
...
FloatBufferlist2FloatBuffer(List arr)
list Float Buffer
ByteBuffer ibb = ByteBuffer.allocateDirect(arr.size() * 4);
ibb.order(ByteOrder.nativeOrder());
FloatBuffer fbb = ibb.asFloatBuffer();
for (float f : arr) {
    fbb.put(f);
fbb.position(0);
return fbb;
...
FloatBufferlist2FloatBuffer(List list)
list Float Buffer
ByteBuffer ibb = ByteBuffer.allocateDirect(list.size() << 2);
ibb.order(ByteOrder.nativeOrder());
FloatBuffer fbb = ibb.asFloatBuffer();
for (float f : list) {
    fbb.put(f);
fbb.position(0);
return fbb;
...
FloatBuffergetFloatBuffer(float[] list)
Genera un FloatBuffer a partir de un array de floats
ByteBuffer bb = ByteBuffer.allocateDirect(list.length * Float.SIZE
        / 8);
bb.order(ByteOrder.nativeOrder());
FloatBuffer fb = bb.asFloatBuffer();
fb.put(list);
fb.position(0);
return fb;