public final class JCGLRG8ByteBuffered extends Object implements JCGLRG8Type
ByteBuffer based implementation of the JCGLRG8 packed type.| Modifier and Type | Method and Description |
|---|---|
double |
getG() |
int |
getGRaw() |
double |
getR() |
int |
getRRaw() |
static JCGLRG8Type |
newValue(ByteBuffer in_buffer,
com.io7m.jpra.runtime.java.JPRACursorByteReadableType in_pointer)
Construct a view of a type.
|
static JCGLRG8Type |
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)
Set the value of all fields.
|
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 JCGLRG8Type 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 JCGLRG8Type 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 JCGLRG8ReadableTyper fieldpublic void setRRaw(int x)
JCGLRG8WritableTyper field.
The 8 least significant bits of x will be used.setRRaw in interface JCGLRG8WritableTypex - The new valuepublic double getR()
getR in interface JCGLRG8ReadableTyper fieldpublic void setR(double x)
JCGLRG8WritableTyper field.setR in interface JCGLRG8WritableTypex - The new value (in the range [0, 1])public int getGRaw()
getGRaw in interface JCGLRG8ReadableTypeg fieldpublic void setGRaw(int x)
JCGLRG8WritableTypeg field.
The 8 least significant bits of x will be used.setGRaw in interface JCGLRG8WritableTypex - The new valuepublic double getG()
getG in interface JCGLRG8ReadableTypeg fieldpublic void setG(double x)
JCGLRG8WritableTypeg field.setG in interface JCGLRG8WritableTypex - The new value (in the range [0, 1])public void set(double r,
double g)
JCGLRG8WritableTypeset in interface JCGLRG8WritableTyper - The value for field rg - The value for field gCopyright © 2016 <code@io7m.com> http://io7m.com