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