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