public class NkColorf
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
struct nk_colorf {
float r;
float g;
float b;
float a;
}| Modifier and Type | Class and Description |
|---|---|
static class |
NkColorf.Buffer
An array of
NkColorf structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
A
The struct member offsets.
|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
B
The struct member offsets.
|
static int |
G
The struct member offsets.
|
static int |
R
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
NkColorf(java.nio.ByteBuffer container)
Creates a
NkColorf instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
float |
a()
Returns the value of the
a field. |
NkColorf |
a(float value)
Sets the specified value to the
a field. |
float |
b()
Returns the value of the
b field. |
NkColorf |
b(float value)
Sets the specified value to the
b field. |
static NkColorf |
calloc()
Returns a new
NkColorf instance allocated with memCalloc. |
static NkColorf.Buffer |
calloc(int capacity)
Returns a new
NkColorf.Buffer instance allocated with memCalloc. |
static NkColorf |
callocStack()
Returns a new
NkColorf instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static NkColorf.Buffer |
callocStack(int capacity)
Returns a new
NkColorf.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static NkColorf.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
NkColorf.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static NkColorf |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
NkColorf instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static NkColorf |
create()
Returns a new
NkColorf instance allocated with BufferUtils. |
static NkColorf.Buffer |
create(int capacity)
Returns a new
NkColorf.Buffer instance allocated with BufferUtils. |
static NkColorf |
create(long address)
Returns a new
NkColorf instance for the specified memory address. |
static NkColorf.Buffer |
create(long address,
int capacity)
Create a
NkColorf.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 the
g field. |
NkColorf |
g(float value)
Sets the specified value to the
g field. |
static NkColorf |
malloc()
Returns a new
NkColorf instance allocated with memAlloc. |
static NkColorf.Buffer |
malloc(int capacity)
Returns a new
NkColorf.Buffer instance allocated with memAlloc. |
static NkColorf |
mallocStack()
Returns a new
NkColorf instance allocated on the thread-local MemoryStack. |
static NkColorf.Buffer |
mallocStack(int capacity)
Returns a new
NkColorf.Buffer instance allocated on the thread-local MemoryStack. |
static NkColorf.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
NkColorf.Buffer instance allocated on the specified MemoryStack. |
static NkColorf |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
NkColorf instance allocated on the specified MemoryStack. |
static float |
na(long struct)
Unsafe version of
a(). |
static void |
na(long struct,
float value)
Unsafe version of
a. |
static float |
nb(long struct)
Unsafe version of
b(). |
static void |
nb(long struct,
float value)
Unsafe version of
b. |
static float |
ng(long struct)
Unsafe version of
g(). |
static void |
ng(long struct,
float value)
Unsafe version of
g. |
static float |
nr(long struct)
Unsafe version of
r(). |
static void |
nr(long struct,
float value)
Unsafe version of
r. |
float |
r()
Returns the value of the
r field. |
NkColorf |
r(float value)
Sets the specified value to the
r 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() |
public static final int SIZEOF
public static final int ALIGNOF
public static final int R
public static final int G
public static final int B
public static final int A
public NkColorf(java.nio.ByteBuffer container)
NkColorf instance at the current position of the specified ByteBuffer 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic float r()
r field.public float g()
g field.public float b()
b field.public float a()
a field.public NkColorf r(float value)
r field.public NkColorf g(float value)
g field.public NkColorf b(float value)
b field.public NkColorf a(float value)
a field.public NkColorf set(float r, float g, float b, float a)
public NkColorf set(NkColorf src)
src - the source structpublic static NkColorf malloc()
NkColorf instance allocated with memAlloc. The instance must be explicitly freed.public static NkColorf calloc()
NkColorf instance allocated with memCalloc. The instance must be explicitly freed.public static NkColorf create()
NkColorf instance allocated with BufferUtils.public static NkColorf create(long address)
NkColorf instance for the specified memory address.@Nullable public static NkColorf createSafe(long address)
public static NkColorf.Buffer malloc(int capacity)
NkColorf.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static NkColorf.Buffer calloc(int capacity)
NkColorf.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static NkColorf.Buffer create(int capacity)
NkColorf.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static NkColorf.Buffer create(long address, int capacity)
NkColorf.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static NkColorf.Buffer createSafe(long address, int capacity)
public static NkColorf mallocStack()
NkColorf instance allocated on the thread-local MemoryStack.public static NkColorf callocStack()
NkColorf instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static NkColorf mallocStack(org.lwjgl.system.MemoryStack stack)
NkColorf instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static NkColorf callocStack(org.lwjgl.system.MemoryStack stack)
NkColorf instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static NkColorf.Buffer mallocStack(int capacity)
NkColorf.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static NkColorf.Buffer callocStack(int capacity)
NkColorf.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static NkColorf.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
NkColorf.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static NkColorf.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
NkColorf.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static float nr(long struct)
r().public static float ng(long struct)
g().public static float nb(long struct)
b().public static float na(long struct)
a().public static void nr(long struct,
float value)
r.public static void ng(long struct,
float value)
g.public static void nb(long struct,
float value)
b.public static void na(long struct,
float value)
a.Copyright LWJGL. All Rights Reserved. License terms.