public final class JCGLRGBA1010102ByteBuffered extends Object implements JCGLRGBA1010102Type
ByteBuffer based implementation of the JCGLRGBA1010102 packed type.| Modifier and Type | Method and Description |
|---|---|
double |
getA() |
int |
getARaw() |
double |
getB() |
int |
getBRaw() |
double |
getG() |
int |
getGRaw() |
double |
getR() |
int |
getRRaw() |
static JCGLRGBA1010102Type |
newValue(ByteBuffer in_buffer,
com.io7m.jpra.runtime.java.JPRACursorByteReadableType in_pointer)
Construct a view of a type.
|
static JCGLRGBA1010102Type |
newValueWithOffset(ByteBuffer in_buffer,
com.io7m.jpra.runtime.java.JPRACursorByteReadableType in_pointer,
int in_base_offset)
Construct a view of a type.
|
void |
set(double r,
double g,
double b,
double a)
Set the value of all fields.
|
void |
setA(double x)
Set the value of the
a field. |
void |
setARaw(int x)
Set the value of the
a field. |
void |
setB(double x)
Set the value of the
b field. |
void |
setBRaw(int x)
Set the value of the
b field. |
void |
setG(double x)
Set the value of the
g field. |
void |
setGRaw(int x)
Set the value of the
g field. |
void |
setR(double x)
Set the value of the
r field. |
void |
setRRaw(int x)
Set the value of the
r field. |
static int |
sizeInOctets() |
int |
sizeOctets() |
public static JCGLRGBA1010102Type newValueWithOffset(ByteBuffer in_buffer, com.io7m.jpra.runtime.java.JPRACursorByteReadableType in_pointer, int in_base_offset)
in_buffer - A byte bufferin_pointer - A cursorin_base_offset - The base offset from the cursorpublic static JCGLRGBA1010102Type newValue(ByteBuffer in_buffer, com.io7m.jpra.runtime.java.JPRACursorByteReadableType in_pointer)
in_buffer - A byte bufferin_pointer - A cursorpublic int sizeOctets()
sizeOctets in interface com.io7m.jpra.runtime.java.JPRAValueTypepublic static int sizeInOctets()
public int getRRaw()
getRRaw in interface JCGLRGBA1010102ReadableTyper fieldpublic void setRRaw(int x)
JCGLRGBA1010102WritableTyper field.
The 10 least significant bits of x will be used.setRRaw in interface JCGLRGBA1010102WritableTypex - The new valuepublic double getR()
getR in interface JCGLRGBA1010102ReadableTyper fieldpublic void setR(double x)
JCGLRGBA1010102WritableTyper field.setR in interface JCGLRGBA1010102WritableTypex - The new value (in the range [0, 1])public int getGRaw()
getGRaw in interface JCGLRGBA1010102ReadableTypeg fieldpublic void setGRaw(int x)
JCGLRGBA1010102WritableTypeg field.
The 10 least significant bits of x will be used.setGRaw in interface JCGLRGBA1010102WritableTypex - The new valuepublic double getG()
getG in interface JCGLRGBA1010102ReadableTypeg fieldpublic void setG(double x)
JCGLRGBA1010102WritableTypeg field.setG in interface JCGLRGBA1010102WritableTypex - The new value (in the range [0, 1])public int getBRaw()
getBRaw in interface JCGLRGBA1010102ReadableTypeb fieldpublic void setBRaw(int x)
JCGLRGBA1010102WritableTypeb field.
The 10 least significant bits of x will be used.setBRaw in interface JCGLRGBA1010102WritableTypex - The new valuepublic double getB()
getB in interface JCGLRGBA1010102ReadableTypeb fieldpublic void setB(double x)
JCGLRGBA1010102WritableTypeb field.setB in interface JCGLRGBA1010102WritableTypex - The new value (in the range [0, 1])public int getARaw()
getARaw in interface JCGLRGBA1010102ReadableTypea fieldpublic void setARaw(int x)
JCGLRGBA1010102WritableTypea field.
The 2 least significant bits of x will be used.setARaw in interface JCGLRGBA1010102WritableTypex - The new valuepublic double getA()
getA in interface JCGLRGBA1010102ReadableTypea fieldpublic void setA(double x)
JCGLRGBA1010102WritableTypea field.setA in interface JCGLRGBA1010102WritableTypex - The new value (in the range [0, 1])public void set(double r,
double g,
double b,
double a)
JCGLRGBA1010102WritableTypeset in interface JCGLRGBA1010102WritableTyper - The value for field rg - The value for field gb - The value for field ba - The value for field aCopyright © 2017 <code@io7m.com> http://io7m.com