public final class VectorByteBufferedM3F extends ByteBuffered implements VectorByteBuffered3FType
A four-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.
|
void |
copyFrom3F(VectorReadable3FType in_v)
Set the current vector to the contents of the input vector.
|
boolean |
equals(Object obj) |
float |
getXF() |
float |
getYF() |
float |
getZF() |
int |
hashCode() |
static VectorByteBuffered3FType |
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 . |
static VectorByteBuffered3FType |
newVectorFromByteBufferAndBase(ByteBuffer b,
AtomicLong base,
int offset)
Return a new vector that is backed by the given byte buffer
b |
void |
set2F(float x,
float y)
Set the current
x and y values of the current vector. |
void |
set3F(float x,
float y,
float z)
Set the current
x, y and z values of the current
vector. |
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. |
void |
setZF(float z)
Set the current
z value of the current vector. |
String |
toString() |
getByteOffset, getIndex, getOffset, setBase, setByteOffsetclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetByteOffset, setByteOffsetpublic static VectorByteBuffered3FType 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 static VectorByteBuffered3FType newVectorFromByteBufferAndBase(ByteBuffer b, AtomicLong base, int offset)
Return a new vector that is backed by the given byte buffer b
The data for the instance will be taken from the data at the current
value of base.get() + offset, each time a field is requested or
set.
No initialization of the data is performed.
b - The byte bufferbase - The base addressoffset - A constant offsetpublic float getZF()
getZF in interface VectorReadable3FTypepublic void setZF(float z)
VectorWritable3FTypez value of the current vector.setZF in interface VectorWritable3FTypez - The new z value.public 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 copyFrom3F(VectorReadable3FType in_v)
VectorWritable3FTypecopyFrom3F in interface VectorWritable3FTypein_v - The input vectorpublic void set3F(float x,
float y,
float z)
VectorWritable3FTypex, y and z values of the current
vector.set3F in interface VectorWritable3FTypex - The new x value.y - The new y value.z - The new z 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.Copyright © 2015 <code@io7m.com> http://io7m.com