public final class VectorByteBufferedM4D extends ByteBuffered implements VectorByteBuffered4DType
A four-element vector type with double 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 |
copyFrom2D(VectorReadable2DType in_v)
Set the current vector to the contents of the input vector.
|
void |
copyFrom3D(VectorReadable3DType in_v)
Set the current vector to the contents of the input vector.
|
void |
copyFrom4D(VectorReadable4DType in_v)
Set the current vector to the contents of the input vector.
|
boolean |
equals(Object obj) |
double |
getWD() |
double |
getXD() |
double |
getYD() |
double |
getZD() |
int |
hashCode() |
static VectorByteBuffered4DType |
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 VectorByteBuffered4DType |
newVectorFromByteBufferAndBase(ByteBuffer b,
AtomicLong base,
int offset)
Return a new vector that is backed by the given byte buffer
b |
void |
set2D(double x,
double y)
Set the current
x and y values of the current vector. |
void |
set3D(double x,
double y,
double z)
Set the current
x, y and z values of the current
vector. |
void |
set4D(double x,
double y,
double z,
double w)
Set the current
x, y, z and w values of the
current vector. |
void |
setWD(double w)
Set the current
w value of the current vector. |
void |
setXD(double x)
Set the current
x value of the current vector. |
void |
setYD(double y)
Set the current
y value of the current vector. |
void |
setZD(double 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 VectorByteBuffered4DType 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 VectorByteBuffered4DType 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 double getWD()
getWD in interface VectorReadable4DTypepublic void setWD(double w)
VectorWritable4DTypew value of the current vector.setWD in interface VectorWritable4DTypew - The new w value.public double getZD()
getZD in interface VectorReadable3DTypepublic void setZD(double z)
VectorWritable3DTypez value of the current vector.setZD in interface VectorWritable3DTypez - The new z value.public double getXD()
getXD in interface VectorReadable2DTypepublic void setXD(double x)
VectorWritable2DTypex value of the current vector.setXD in interface VectorWritable2DTypex - The new x value.public double getYD()
getYD in interface VectorReadable2DTypepublic void setYD(double y)
VectorWritable2DTypey value of the current vector.setYD in interface VectorWritable2DTypey - The new y value.public void copyFrom4D(VectorReadable4DType in_v)
VectorWritable4DTypecopyFrom4D in interface VectorWritable4DTypein_v - The input vectorpublic void set4D(double x,
double y,
double z,
double w)
VectorWritable4DTypex, y, z and w values of the
current vector.set4D in interface VectorWritable4DTypex - The new x value.y - The new y value.z - The new z value.w - The new w value.public void copyFrom3D(VectorReadable3DType in_v)
VectorWritable3DTypecopyFrom3D in interface VectorWritable3DTypein_v - The input vectorpublic void set3D(double x,
double y,
double z)
VectorWritable3DTypex, y and z values of the current
vector.set3D in interface VectorWritable3DTypex - The new x value.y - The new y value.z - The new z value.public void copyFrom2D(VectorReadable2DType in_v)
VectorWritable2DTypecopyFrom2D in interface VectorWritable2DTypein_v - The input vectorpublic void set2D(double x,
double y)
VectorWritable2DTypex and y values of the current vector.set2D in interface VectorWritable2DTypex - The new x value.y - The new y value.Copyright © 2015 <code@io7m.com> http://io7m.com