Package org.lwjgl.vulkan
Class VkGeometryDataNV
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkGeometryDataNV
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VkGeometryDataNV extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Structure specifying geometry in a bottom-level acceleration structure.Valid Usage (Implicit)
triangles
must be a validVkGeometryTrianglesNV
structureaabbs
must be a validVkGeometryAABBNV
structure
See Also
VkGeometryAABBNV
,VkGeometryNV
,VkGeometryTrianglesNV
Member documentation
triangles
– contains triangle data ifVkGeometryNV
::geometryType
isGEOMETRY_TYPE_TRIANGLES_NV
.aabbs
– contains axis-aligned bounding box data ifVkGeometryNV
::geometryType
isGEOMETRY_TYPE_AABBS_NV
.
Layout
struct VkGeometryDataNV {
VkGeometryTrianglesNV
triangles;VkGeometryAABBNV
aabbs; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkGeometryDataNV.Buffer
An array ofVkGeometryDataNV
structs.
-
Constructor Summary
Constructors Constructor Description VkGeometryDataNV(java.nio.ByteBuffer container)
Creates aVkGeometryDataNV
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description VkGeometryAABBNV
aabbs()
Returns aVkGeometryAABBNV
view of theaabbs
field.VkGeometryDataNV
aabbs(java.util.function.Consumer<VkGeometryAABBNV> consumer)
Passes theaabbs
field to the specifiedConsumer
.VkGeometryDataNV
aabbs(VkGeometryAABBNV value)
Copies the specifiedVkGeometryAABBNV
to theaabbs
field.static VkGeometryDataNV
calloc()
Returns a newVkGeometryDataNV
instance allocated withmemCalloc
.static VkGeometryDataNV.Buffer
calloc(int capacity)
Returns a newVkGeometryDataNV.Buffer
instance allocated withmemCalloc
.static VkGeometryDataNV
callocStack()
Returns a newVkGeometryDataNV
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkGeometryDataNV.Buffer
callocStack(int capacity)
Returns a newVkGeometryDataNV.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkGeometryDataNV.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkGeometryDataNV.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkGeometryDataNV
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkGeometryDataNV
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkGeometryDataNV
create()
Returns a newVkGeometryDataNV
instance allocated withBufferUtils
.static VkGeometryDataNV.Buffer
create(int capacity)
Returns a newVkGeometryDataNV.Buffer
instance allocated withBufferUtils
.static VkGeometryDataNV
create(long address)
Returns a newVkGeometryDataNV
instance for the specified memory address.static VkGeometryDataNV.Buffer
create(long address, int capacity)
Create aVkGeometryDataNV.Buffer
instance at the specified memory.static VkGeometryDataNV
createSafe(long address)
static VkGeometryDataNV.Buffer
createSafe(long address, int capacity)
static VkGeometryDataNV
malloc()
Returns a newVkGeometryDataNV
instance allocated withmemAlloc
.static VkGeometryDataNV.Buffer
malloc(int capacity)
Returns a newVkGeometryDataNV.Buffer
instance allocated withmemAlloc
.static VkGeometryDataNV
mallocStack()
Returns a newVkGeometryDataNV
instance allocated on the thread-localMemoryStack
.static VkGeometryDataNV.Buffer
mallocStack(int capacity)
Returns a newVkGeometryDataNV.Buffer
instance allocated on the thread-localMemoryStack
.static VkGeometryDataNV.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkGeometryDataNV.Buffer
instance allocated on the specifiedMemoryStack
.static VkGeometryDataNV
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkGeometryDataNV
instance allocated on the specifiedMemoryStack
.static VkGeometryAABBNV
naabbs(long struct)
Unsafe version ofaabbs()
.static void
naabbs(long struct, VkGeometryAABBNV value)
Unsafe version ofaabbs
.static VkGeometryTrianglesNV
ntriangles(long struct)
Unsafe version oftriangles()
.static void
ntriangles(long struct, VkGeometryTrianglesNV value)
Unsafe version oftriangles
.VkGeometryDataNV
set(VkGeometryDataNV src)
Copies the specified struct data to this struct.VkGeometryDataNV
set(VkGeometryTrianglesNV triangles, VkGeometryAABBNV aabbs)
Initializes this struct with the specified values.int
sizeof()
VkGeometryTrianglesNV
triangles()
Returns aVkGeometryTrianglesNV
view of thetriangles
field.VkGeometryDataNV
triangles(java.util.function.Consumer<VkGeometryTrianglesNV> consumer)
Passes thetriangles
field to the specifiedConsumer
.VkGeometryDataNV
triangles(VkGeometryTrianglesNV value)
Copies the specifiedVkGeometryTrianglesNV
to thetriangles
field.
-
-
-
Constructor Detail
-
VkGeometryDataNV
public VkGeometryDataNV(java.nio.ByteBuffer container)
Creates aVkGeometryDataNV
instance at the current position of the specifiedByteBuffer
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.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
triangles
public VkGeometryTrianglesNV triangles()
Returns aVkGeometryTrianglesNV
view of thetriangles
field.
-
aabbs
public VkGeometryAABBNV aabbs()
Returns aVkGeometryAABBNV
view of theaabbs
field.
-
triangles
public VkGeometryDataNV triangles(VkGeometryTrianglesNV value)
Copies the specifiedVkGeometryTrianglesNV
to thetriangles
field.
-
triangles
public VkGeometryDataNV triangles(java.util.function.Consumer<VkGeometryTrianglesNV> consumer)
Passes thetriangles
field to the specifiedConsumer
.
-
aabbs
public VkGeometryDataNV aabbs(VkGeometryAABBNV value)
Copies the specifiedVkGeometryAABBNV
to theaabbs
field.
-
aabbs
public VkGeometryDataNV aabbs(java.util.function.Consumer<VkGeometryAABBNV> consumer)
Passes theaabbs
field to the specifiedConsumer
.
-
set
public VkGeometryDataNV set(VkGeometryTrianglesNV triangles, VkGeometryAABBNV aabbs)
Initializes this struct with the specified values.
-
set
public VkGeometryDataNV set(VkGeometryDataNV src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkGeometryDataNV malloc()
Returns a newVkGeometryDataNV
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkGeometryDataNV calloc()
Returns a newVkGeometryDataNV
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkGeometryDataNV create()
Returns a newVkGeometryDataNV
instance allocated withBufferUtils
.
-
create
public static VkGeometryDataNV create(long address)
Returns a newVkGeometryDataNV
instance for the specified memory address.
-
createSafe
@Nullable public static VkGeometryDataNV createSafe(long address)
-
malloc
public static VkGeometryDataNV.Buffer malloc(int capacity)
Returns a newVkGeometryDataNV.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkGeometryDataNV.Buffer calloc(int capacity)
Returns a newVkGeometryDataNV.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkGeometryDataNV.Buffer create(int capacity)
Returns a newVkGeometryDataNV.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkGeometryDataNV.Buffer create(long address, int capacity)
Create aVkGeometryDataNV.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkGeometryDataNV.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkGeometryDataNV mallocStack()
Returns a newVkGeometryDataNV
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkGeometryDataNV callocStack()
Returns a newVkGeometryDataNV
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkGeometryDataNV mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkGeometryDataNV
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkGeometryDataNV callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkGeometryDataNV
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkGeometryDataNV.Buffer mallocStack(int capacity)
Returns a newVkGeometryDataNV.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkGeometryDataNV.Buffer callocStack(int capacity)
Returns a newVkGeometryDataNV.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkGeometryDataNV.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkGeometryDataNV.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkGeometryDataNV.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkGeometryDataNV.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
ntriangles
public static VkGeometryTrianglesNV ntriangles(long struct)
Unsafe version oftriangles()
.
-
naabbs
public static VkGeometryAABBNV naabbs(long struct)
Unsafe version ofaabbs()
.
-
ntriangles
public static void ntriangles(long struct, VkGeometryTrianglesNV value)
Unsafe version oftriangles
.
-
naabbs
public static void naabbs(long struct, VkGeometryAABBNV value)
Unsafe version ofaabbs
.
-
-