Package org.lwjgl.ovr
Class OVRColorf
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.ovr.OVRColorf
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer
public class OVRColorf extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceAn RGBA color with normalized float components.Member documentation
r– the R componentg– the G componentb– the B componenta– the A component
Layout
struct ovrColorf { float r; float g; float b; float a; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classOVRColorf.BufferAn array ofOVRColorfstructs.
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description floata()Returns the value of theafield.OVRColorfa(float value)Sets the specified value to theafield.floatb()Returns the value of thebfield.OVRColorfb(float value)Sets the specified value to thebfield.static OVRColorfcalloc()Returns a newOVRColorfinstance allocated withmemCalloc.static OVRColorf.Buffercalloc(int capacity)Returns a newOVRColorf.Bufferinstance allocated withmemCalloc.static OVRColorfcallocStack()Returns a newOVRColorfinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static OVRColorf.BuffercallocStack(int capacity)Returns a newOVRColorf.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static OVRColorf.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newOVRColorf.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRColorfcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newOVRColorfinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRColorfcreate()Returns a newOVRColorfinstance allocated withBufferUtils.static OVRColorf.Buffercreate(int capacity)Returns a newOVRColorf.Bufferinstance allocated withBufferUtils.static OVRColorfcreate(long address)static OVRColorf.Buffercreate(long address, int capacity)Create aOVRColorf.Bufferinstance at the specified memory.floatg()Returns the value of thegfield.OVRColorfg(float value)Sets the specified value to thegfield.static OVRColorfmalloc()Returns a newOVRColorfinstance allocated withmemAlloc.static OVRColorf.Buffermalloc(int capacity)Returns a newOVRColorf.Bufferinstance allocated withmemAlloc.static OVRColorfmallocStack()Returns a newOVRColorfinstance allocated on the thread-localMemoryStack.static OVRColorf.BuffermallocStack(int capacity)Returns a newOVRColorf.Bufferinstance allocated on the thread-localMemoryStack.static OVRColorf.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newOVRColorf.Bufferinstance allocated on the specifiedMemoryStack.static OVRColorfmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newOVRColorfinstance allocated on the specifiedMemoryStack.floatr()Returns the value of therfield.OVRColorfr(float value)Sets the specified value to therfield.OVRColorfset(float r, float g, float b, float a)Initializes this struct with the specified values.OVRColorfset(OVRColorf src)Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).
-
-
-
Constructor Detail
-
OVRColorf
public OVRColorf(java.nio.ByteBuffer container)
Creates aOVRColorfinstance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Detail
-
sizeof
public int sizeof()
Description copied from class:org.lwjgl.system.StructReturnssizeof(struct).- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
r
public float r()
Returns the value of therfield.
-
g
public float g()
Returns the value of thegfield.
-
b
public float b()
Returns the value of thebfield.
-
a
public float a()
Returns the value of theafield.
-
r
public OVRColorf r(float value)
Sets the specified value to therfield.
-
g
public OVRColorf g(float value)
Sets the specified value to thegfield.
-
b
public OVRColorf b(float value)
Sets the specified value to thebfield.
-
a
public OVRColorf a(float value)
Sets the specified value to theafield.
-
set
public OVRColorf set(float r, float g, float b, float a)
Initializes this struct with the specified values.
-
set
public OVRColorf set(OVRColorf src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static OVRColorf malloc()
Returns a newOVRColorfinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static OVRColorf calloc()
Returns a newOVRColorfinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static OVRColorf create()
Returns a newOVRColorfinstance allocated withBufferUtils.
-
create
public static OVRColorf create(long address)
-
malloc
public static OVRColorf.Buffer malloc(int capacity)
Returns a newOVRColorf.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static OVRColorf.Buffer calloc(int capacity)
Returns a newOVRColorf.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static OVRColorf.Buffer create(int capacity)
Returns a newOVRColorf.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static OVRColorf.Buffer create(long address, int capacity)
Create aOVRColorf.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static OVRColorf mallocStack()
Returns a newOVRColorfinstance allocated on the thread-localMemoryStack.
-
callocStack
public static OVRColorf callocStack()
Returns a newOVRColorfinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static OVRColorf mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRColorfinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static OVRColorf callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRColorfinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static OVRColorf.Buffer mallocStack(int capacity)
Returns a newOVRColorf.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static OVRColorf.Buffer callocStack(int capacity)
Returns a newOVRColorf.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static OVRColorf.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newOVRColorf.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static OVRColorf.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newOVRColorf.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-