public final class VectorByteBufferedM2F extends Object implements VectorByteBuffered2FType
A two-element vector type with float elements, packed into a
ByteBuffer.
Values of this type cannot be accessed safely from multiple threads without explicit synchronization.
| Modifier and Type | Method and Description |
|---|---|
void |
copyFrom2F(VectorReadable2FType in_v)
Set the current vector to the contents of the input vector.
|
boolean |
equals(Object obj) |
long |
getByteOffset() |
float |
getXF() |
float |
getYF() |
int |
hashCode() |
static VectorByteBuffered2FType |
newVectorFromByteBuffer(ByteBuffer b,
long byte_offset)
Return a new vector that is backed by whatever data is at byte offset
byte_offset in the byte buffer . |
void |
set2F(float x,
float y)
Set the current
x and y values of the current vector. |
void |
setByteOffset(long b)
Set the base byte offset of this value.
|
void |
setXF(float x)
Set the current
x value of the current vector. |
void |
setYF(float y)
Set the current
y value of the current vector. |
String |
toString() |
public static VectorByteBuffered2FType newVectorFromByteBuffer(ByteBuffer b, long byte_offset)
Return a new vector that is backed by whatever data is at byte offset
byte_offset in the byte buffer .
No initialization of the data is performed.
b - The byte bufferbyte_offset - A byte offsetpublic float getXF()
getXF in interface VectorReadable2FTypepublic void setXF(float x)
VectorWritable2FTypex value of the current vector.setXF in interface VectorWritable2FTypex - The new x value.public float getYF()
getYF in interface VectorReadable2FTypepublic void setYF(float y)
VectorWritable2FTypey value of the current vector.setYF in interface VectorWritable2FTypey - The new y value.public void copyFrom2F(VectorReadable2FType in_v)
VectorWritable2FTypecopyFrom2F in interface VectorWritable2FTypein_v - The input vectorpublic void set2F(float x,
float y)
VectorWritable2FTypex and y values of the current vector.set2F in interface VectorWritable2FTypex - The new x value.y - The new y value.public long getByteOffset()
getByteOffset in interface ByteBufferedTypepublic void setByteOffset(long b)
ByteBufferedTypeSet the base byte offset of this value.
Must be non-negative.
setByteOffset in interface ByteBufferedTypeb - The offset in bytesCopyright © 2015 <code@io7m.com> http://io7m.com