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