public final class JCGLRGBA8ByteBuffered extends Object implements JCGLRGBA8Type
ByteBuffer based implementation of the JCGLRGBA8 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 JCGLRGBA8Type |
newValue(ByteBuffer in_buffer,
com.io7m.jpra.runtime.java.JPRACursorByteReadableType in_pointer)
Construct a view of a type.
|
static JCGLRGBA8Type |
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 JCGLRGBA8Type 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 JCGLRGBA8Type 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 JCGLRGBA8ReadableTyper fieldpublic void setRRaw(int x)
JCGLRGBA8WritableTyper field.
The 8 least significant bits of x will be used.setRRaw in interface JCGLRGBA8WritableTypex - The new valuepublic double getR()
getR in interface JCGLRGBA8ReadableTyper fieldpublic void setR(double x)
JCGLRGBA8WritableTyper field.setR in interface JCGLRGBA8WritableTypex - The new value (in the range [0, 1])public int getGRaw()
getGRaw in interface JCGLRGBA8ReadableTypeg fieldpublic void setGRaw(int x)
JCGLRGBA8WritableTypeg field.
The 8 least significant bits of x will be used.setGRaw in interface JCGLRGBA8WritableTypex - The new valuepublic double getG()
getG in interface JCGLRGBA8ReadableTypeg fieldpublic void setG(double x)
JCGLRGBA8WritableTypeg field.setG in interface JCGLRGBA8WritableTypex - The new value (in the range [0, 1])public int getBRaw()
getBRaw in interface JCGLRGBA8ReadableTypeb fieldpublic void setBRaw(int x)
JCGLRGBA8WritableTypeb field.
The 8 least significant bits of x will be used.setBRaw in interface JCGLRGBA8WritableTypex - The new valuepublic double getB()
getB in interface JCGLRGBA8ReadableTypeb fieldpublic void setB(double x)
JCGLRGBA8WritableTypeb field.setB in interface JCGLRGBA8WritableTypex - The new value (in the range [0, 1])public int getARaw()
getARaw in interface JCGLRGBA8ReadableTypea fieldpublic void setARaw(int x)
JCGLRGBA8WritableTypea field.
The 8 least significant bits of x will be used.setARaw in interface JCGLRGBA8WritableTypex - The new valuepublic double getA()
getA in interface JCGLRGBA8ReadableTypea fieldpublic void setA(double x)
JCGLRGBA8WritableTypea field.setA in interface JCGLRGBA8WritableTypex - The new value (in the range [0, 1])public void set(double r,
double g,
double b,
double a)
JCGLRGBA8WritableTypeset in interface JCGLRGBA8WritableTyper - The value for field rg - The value for field gb - The value for field ba - The value for field aCopyright © 2016 <code@io7m.com> http://io7m.com