Package org.robovm.rt.bro.ptr
Class FloatPtr
public final class FloatPtr extends Struct<FloatPtr>
Points to a
float value (float * in C).-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFloatPtr.FloatPtrPtrPointer toFloatPtr(float **in C)Nested classes/interfaces inherited from class org.robovm.rt.bro.Struct
Struct.Marshaler -
Constructor Summary
-
Method Summary
Modifier and Type Method Description FloatBufferasFloatBuffer(int n)Returns aFloatBufferwhich reads and writes to the same memory location pointed to by thisFloatPtr.floatget()Returns the current value.voidget(float[] dst)voidget(float[] dst, int offset, int count)voidset(float value)Sets the value.voidset(float[] src)voidset(float[] src, int offset, int count)float[]toFloatArray(int n)Methods inherited from class org.robovm.rt.bro.Struct
_sizeOf, allocate, allocate, as, clear, clear, copy, copy, copyWithMalloc, copyWithMalloc, free, iterator, iterator, malloc, malloc, next, next, offsetOf, previous, previous, sizeOf, sizeOf, toArray, toList, toStruct, update, update, update, wrapMethods inherited from class org.robovm.rt.bro.NativeObject
equals, getHandle, hashCode, setHandle
-
Constructor Details
-
Method Details
-
get
public float get()Returns the current value.- Returns:
- the value.
-
set
public void set(float value)Sets the value.- Parameters:
value- the new value.
-
asFloatBuffer
Returns aFloatBufferwhich reads and writes to the same memory location pointed to by thisFloatPtr.- Parameters:
n- the maximum number of floats theFloatBuffercan read/write. This will be theFloatBuffer'scapacity.- Returns:
- the
FloatBuffer.
-
toFloatArray
public float[] toFloatArray(int n)- Parameters:
n- the number of floats to copy.- Returns:
- the
float[].
-
get
public void get(float[] dst)- Parameters:
dst- the destination.
-
get
public void get(float[] dst, int offset, int count)- Parameters:
dst- the destination.offset- the offset within the destination array to start copying to.count- the number of elements to copy.
-
set
public void set(float[] src)- Parameters:
src- the source.
-
set
public void set(float[] src, int offset, int count)- Parameters:
src- the source.offset- the offset within the source array to start copying from.count- the number of elements to copy.
-