Package org.lwjgl.nuklear
Class NkColorf
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nuklear.NkColorf
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class NkColorf extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Layout
struct nk_colorf { float r; float g; float b; float a; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NkColorf.Buffer
An array ofNkColorf
structs.
-
Constructor Summary
Constructors Constructor Description NkColorf(java.nio.ByteBuffer container)
Creates aNkColorf
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description float
a()
Returns the value of thea
field.NkColorf
a(float value)
Sets the specified value to thea
field.float
b()
Returns the value of theb
field.NkColorf
b(float value)
Sets the specified value to theb
field.static NkColorf
calloc()
Returns a newNkColorf
instance allocated withmemCalloc
.static NkColorf.Buffer
calloc(int capacity)
Returns a newNkColorf.Buffer
instance allocated withmemCalloc
.static NkColorf
callocStack()
Returns a newNkColorf
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static NkColorf.Buffer
callocStack(int capacity)
Returns a newNkColorf.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static NkColorf.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkColorf.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static NkColorf
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkColorf
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static NkColorf
create()
Returns a newNkColorf
instance allocated withBufferUtils
.static NkColorf.Buffer
create(int capacity)
Returns a newNkColorf.Buffer
instance allocated withBufferUtils
.static NkColorf
create(long address)
Returns a newNkColorf
instance for the specified memory address.static NkColorf.Buffer
create(long address, int capacity)
Create aNkColorf.Buffer
instance at the specified memory.static NkColorf
createSafe(long address)
static NkColorf.Buffer
createSafe(long address, int capacity)
float
g()
Returns the value of theg
field.NkColorf
g(float value)
Sets the specified value to theg
field.static NkColorf
malloc()
Returns a newNkColorf
instance allocated withmemAlloc
.static NkColorf.Buffer
malloc(int capacity)
Returns a newNkColorf.Buffer
instance allocated withmemAlloc
.static NkColorf
mallocStack()
Returns a newNkColorf
instance allocated on the thread-localMemoryStack
.static NkColorf.Buffer
mallocStack(int capacity)
Returns a newNkColorf.Buffer
instance allocated on the thread-localMemoryStack
.static NkColorf.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkColorf.Buffer
instance allocated on the specifiedMemoryStack
.static NkColorf
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkColorf
instance allocated on the specifiedMemoryStack
.static float
na(long struct)
Unsafe version ofa()
.static void
na(long struct, float value)
Unsafe version ofa
.static float
nb(long struct)
Unsafe version ofb()
.static void
nb(long struct, float value)
Unsafe version ofb
.static float
ng(long struct)
Unsafe version ofg()
.static void
ng(long struct, float value)
Unsafe version ofg
.static float
nr(long struct)
Unsafe version ofr()
.static void
nr(long struct, float value)
Unsafe version ofr
.float
r()
Returns the value of ther
field.NkColorf
r(float value)
Sets the specified value to ther
field.NkColorf
set(float r, float g, float b, float a)
Initializes this struct with the specified values.NkColorf
set(NkColorf src)
Copies the specified struct data to this struct.int
sizeof()
-
-
-
Constructor Detail
-
NkColorf
public NkColorf(java.nio.ByteBuffer container)
Creates aNkColorf
instance at the current position of the specifiedByteBuffer
container. 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()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
r
public float r()
Returns the value of ther
field.
-
g
public float g()
Returns the value of theg
field.
-
b
public float b()
Returns the value of theb
field.
-
a
public float a()
Returns the value of thea
field.
-
r
public NkColorf r(float value)
Sets the specified value to ther
field.
-
g
public NkColorf g(float value)
Sets the specified value to theg
field.
-
b
public NkColorf b(float value)
Sets the specified value to theb
field.
-
a
public NkColorf a(float value)
Sets the specified value to thea
field.
-
set
public NkColorf set(float r, float g, float b, float a)
Initializes this struct with the specified values.
-
set
public NkColorf set(NkColorf src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static NkColorf malloc()
Returns a newNkColorf
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static NkColorf calloc()
Returns a newNkColorf
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static NkColorf create()
Returns a newNkColorf
instance allocated withBufferUtils
.
-
create
public static NkColorf create(long address)
Returns a newNkColorf
instance for the specified memory address.
-
createSafe
@Nullable public static NkColorf createSafe(long address)
-
malloc
public static NkColorf.Buffer malloc(int capacity)
Returns a newNkColorf.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static NkColorf.Buffer calloc(int capacity)
Returns a newNkColorf.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static NkColorf.Buffer create(int capacity)
Returns a newNkColorf.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static NkColorf.Buffer create(long address, int capacity)
Create aNkColorf.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static NkColorf.Buffer createSafe(long address, int capacity)
-
mallocStack
public static NkColorf mallocStack()
Returns a newNkColorf
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static NkColorf callocStack()
Returns a newNkColorf
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static NkColorf mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkColorf
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static NkColorf callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkColorf
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static NkColorf.Buffer mallocStack(int capacity)
Returns a newNkColorf.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static NkColorf.Buffer callocStack(int capacity)
Returns a newNkColorf.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static NkColorf.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkColorf.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static NkColorf.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkColorf.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nr
public static float nr(long struct)
Unsafe version ofr()
.
-
ng
public static float ng(long struct)
Unsafe version ofg()
.
-
nb
public static float nb(long struct)
Unsafe version ofb()
.
-
na
public static float na(long struct)
Unsafe version ofa()
.
-
nr
public static void nr(long struct, float value)
Unsafe version ofr
.
-
ng
public static void ng(long struct, float value)
Unsafe version ofg
.
-
nb
public static void nb(long struct, float value)
Unsafe version ofb
.
-
na
public static void na(long struct, float value)
Unsafe version ofa
.
-
-