public class AIColor4D
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
r – The red color componentg – The green color componentb – The blue color componenta – The alpha color component
struct aiColor4D {
float r;
float g;
float b;
float a;
}| Modifier and Type | Class and Description |
|---|---|
static class |
AIColor4D.Buffer
An array of
AIColor4D 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 |
|---|
AIColor4D(java.nio.ByteBuffer container)
Creates a
AIColor4D 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. |
AIColor4D |
a(float value)
Sets the specified value to the
a field. |
float |
b()
Returns the value of the
b field. |
AIColor4D |
b(float value)
Sets the specified value to the
b field. |
static AIColor4D |
calloc()
Returns a new
AIColor4D instance allocated with memCalloc. |
static AIColor4D.Buffer |
calloc(int capacity)
Returns a new
AIColor4D.Buffer instance allocated with memCalloc. |
static AIColor4D |
callocStack()
Returns a new
AIColor4D instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static AIColor4D.Buffer |
callocStack(int capacity)
Returns a new
AIColor4D.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static AIColor4D.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
AIColor4D.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static AIColor4D |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
AIColor4D instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static AIColor4D |
create()
Returns a new
AIColor4D instance allocated with BufferUtils. |
static AIColor4D.Buffer |
create(int capacity)
Returns a new
AIColor4D.Buffer instance allocated with BufferUtils. |
static AIColor4D |
create(long address)
Returns a new
AIColor4D instance for the specified memory address. |
static AIColor4D.Buffer |
create(long address,
int capacity)
Create a
AIColor4D.Buffer instance at the specified memory. |
static AIColor4D |
createSafe(long address)
|
static AIColor4D.Buffer |
createSafe(long address,
int capacity)
|
float |
g()
Returns the value of the
g field. |
AIColor4D |
g(float value)
Sets the specified value to the
g field. |
static AIColor4D |
malloc()
Returns a new
AIColor4D instance allocated with memAlloc. |
static AIColor4D.Buffer |
malloc(int capacity)
Returns a new
AIColor4D.Buffer instance allocated with memAlloc. |
static AIColor4D |
mallocStack()
Returns a new
AIColor4D instance allocated on the thread-local MemoryStack. |
static AIColor4D.Buffer |
mallocStack(int capacity)
Returns a new
AIColor4D.Buffer instance allocated on the thread-local MemoryStack. |
static AIColor4D.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
AIColor4D.Buffer instance allocated on the specified MemoryStack. |
static AIColor4D |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
AIColor4D 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. |
AIColor4D |
r(float value)
Sets the specified value to the
r field. |
AIColor4D |
set(AIColor4D src)
Copies the specified struct data to this struct.
|
AIColor4D |
set(float r,
float g,
float b,
float a)
Initializes this struct with the specified values.
|
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 AIColor4D(java.nio.ByteBuffer container)
AIColor4D 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 AIColor4D r(float value)
r field.public AIColor4D g(float value)
g field.public AIColor4D b(float value)
b field.public AIColor4D a(float value)
a field.public AIColor4D set(float r, float g, float b, float a)
public AIColor4D set(AIColor4D src)
src - the source structpublic static AIColor4D malloc()
AIColor4D instance allocated with memAlloc. The instance must be explicitly freed.public static AIColor4D calloc()
AIColor4D instance allocated with memCalloc. The instance must be explicitly freed.public static AIColor4D create()
AIColor4D instance allocated with BufferUtils.public static AIColor4D create(long address)
AIColor4D instance for the specified memory address.@Nullable public static AIColor4D createSafe(long address)
public static AIColor4D.Buffer malloc(int capacity)
AIColor4D.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static AIColor4D.Buffer calloc(int capacity)
AIColor4D.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static AIColor4D.Buffer create(int capacity)
AIColor4D.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static AIColor4D.Buffer create(long address, int capacity)
AIColor4D.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static AIColor4D.Buffer createSafe(long address, int capacity)
public static AIColor4D mallocStack()
AIColor4D instance allocated on the thread-local MemoryStack.public static AIColor4D callocStack()
AIColor4D instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static AIColor4D mallocStack(org.lwjgl.system.MemoryStack stack)
AIColor4D instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static AIColor4D callocStack(org.lwjgl.system.MemoryStack stack)
AIColor4D instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static AIColor4D.Buffer mallocStack(int capacity)
AIColor4D.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static AIColor4D.Buffer callocStack(int capacity)
AIColor4D.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static AIColor4D.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
AIColor4D.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static AIColor4D.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
AIColor4D.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.