Package org.lwjgl.vulkan
Class VkAccelerationStructureGeometryTrianglesDataKHR
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkAccelerationStructureGeometryTrianglesDataKHR
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkAccelerationStructureGeometryTrianglesDataKHR extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying a triangle geometry in a bottom-level acceleration structure.Description
Note
Unlike the stride for vertex buffers in
VkVertexInputBindingDescriptionfor graphics pipelines which must not exceedmaxVertexInputBindingStride,vertexStridefor acceleration structure geometry is instead restricted to being a 32-bit value.Valid Usage
vertexStridemust be a multiple of the size in bytes of the smallest component ofvertexFormatvertexStridemust be less than or equal to232-1vertexFormatmust support theFORMAT_FEATURE_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHRinVkFormatProperties::bufferFeaturesas returned byGetPhysicalDeviceFormatProperties2indexTypemust beINDEX_TYPE_UINT16,INDEX_TYPE_UINT32, orINDEX_TYPE_NONE_KHR
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHRpNextmust beNULLor a pointer to a valid instance ofVkAccelerationStructureGeometryMotionTrianglesDataNV- The
sTypevalue of each struct in thepNextchain must be unique vertexFormatmust be a validVkFormatvalueindexTypemust be a validVkIndexTypevalue
See Also
VkAccelerationStructureGeometryDataKHR,VkDeviceOrHostAddressConstKHRLayout
struct VkAccelerationStructureGeometryTrianglesDataKHR { VkStructureTypesType(); void const *pNext(); VkFormatvertexFormat();VkDeviceOrHostAddressConstKHRvertexData(); VkDeviceSizevertexStride(); uint32_tmaxVertex(); VkIndexTypeindexType();VkDeviceOrHostAddressConstKHRindexData();VkDeviceOrHostAddressConstKHRtransformData(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkAccelerationStructureGeometryTrianglesDataKHR.BufferAn array ofVkAccelerationStructureGeometryTrianglesDataKHRstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intINDEXDATA
INDEXTYPE
MAXVERTEX
PNEXTThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTYPE
TRANSFORMDATA
VERTEXDATA
VERTEXFORMAT
VERTEXSTRIDEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkAccelerationStructureGeometryTrianglesDataKHR(java.nio.ByteBuffer container)Creates aVkAccelerationStructureGeometryTrianglesDataKHRinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkAccelerationStructureGeometryTrianglesDataKHRcalloc()Returns a newVkAccelerationStructureGeometryTrianglesDataKHRinstance allocated withmemCalloc.static VkAccelerationStructureGeometryTrianglesDataKHR.Buffercalloc(int capacity)Returns a newVkAccelerationStructureGeometryTrianglesDataKHR.Bufferinstance allocated withmemCalloc.static VkAccelerationStructureGeometryTrianglesDataKHR.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkAccelerationStructureGeometryTrianglesDataKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkAccelerationStructureGeometryTrianglesDataKHRcalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkAccelerationStructureGeometryTrianglesDataKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkAccelerationStructureGeometryTrianglesDataKHRcreate()Returns a newVkAccelerationStructureGeometryTrianglesDataKHRinstance allocated withBufferUtils.static VkAccelerationStructureGeometryTrianglesDataKHR.Buffercreate(int capacity)Returns a newVkAccelerationStructureGeometryTrianglesDataKHR.Bufferinstance allocated withBufferUtils.static VkAccelerationStructureGeometryTrianglesDataKHRcreate(long address)Returns a newVkAccelerationStructureGeometryTrianglesDataKHRinstance for the specified memory address.static VkAccelerationStructureGeometryTrianglesDataKHR.Buffercreate(long address, int capacity)Create aVkAccelerationStructureGeometryTrianglesDataKHR.Bufferinstance at the specified memory.static VkAccelerationStructureGeometryTrianglesDataKHRcreateSafe(long address)static VkAccelerationStructureGeometryTrianglesDataKHR.BuffercreateSafe(long address, int capacity)VkDeviceOrHostAddressConstKHRindexData()a device or host address to memory containing index data for this geometry.VkAccelerationStructureGeometryTrianglesDataKHRindexData(java.util.function.Consumer<VkDeviceOrHostAddressConstKHR> consumer)Passes theindexData()field to the specifiedConsumer.VkAccelerationStructureGeometryTrianglesDataKHRindexData(VkDeviceOrHostAddressConstKHR value)Copies the specifiedVkDeviceOrHostAddressConstKHRto theindexData()field.intindexType()theVkIndexTypeof each index element.VkAccelerationStructureGeometryTrianglesDataKHRindexType(int value)Sets the specified value to theindexType()field.static VkAccelerationStructureGeometryTrianglesDataKHRmalloc()Returns a newVkAccelerationStructureGeometryTrianglesDataKHRinstance allocated withmemAlloc.static VkAccelerationStructureGeometryTrianglesDataKHR.Buffermalloc(int capacity)Returns a newVkAccelerationStructureGeometryTrianglesDataKHR.Bufferinstance allocated withmemAlloc.static VkAccelerationStructureGeometryTrianglesDataKHR.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkAccelerationStructureGeometryTrianglesDataKHR.Bufferinstance allocated on the specifiedMemoryStack.static VkAccelerationStructureGeometryTrianglesDataKHRmalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkAccelerationStructureGeometryTrianglesDataKHRinstance allocated on the specifiedMemoryStack.intmaxVertex()the highest index of a vertex that will be addressed by a build command using this structure.VkAccelerationStructureGeometryTrianglesDataKHRmaxVertex(int value)Sets the specified value to themaxVertex()field.static VkDeviceOrHostAddressConstKHRnindexData(long struct)Unsafe version ofindexData().static voidnindexData(long struct, VkDeviceOrHostAddressConstKHR value)Unsafe version ofindexData.static intnindexType(long struct)Unsafe version ofindexType().static voidnindexType(long struct, int value)Unsafe version ofindexType.static intnmaxVertex(long struct)Unsafe version ofmaxVertex().static voidnmaxVertex(long struct, int value)Unsafe version ofmaxVertex.static longnpNext(long struct)Unsafe version ofpNext().static voidnpNext(long struct, long value)Unsafe version ofpNext.static intnsType(long struct)Unsafe version ofsType().static voidnsType(long struct, int value)Unsafe version ofsType.static VkDeviceOrHostAddressConstKHRntransformData(long struct)Unsafe version oftransformData().static voidntransformData(long struct, VkDeviceOrHostAddressConstKHR value)Unsafe version oftransformData.static VkDeviceOrHostAddressConstKHRnvertexData(long struct)Unsafe version ofvertexData().static voidnvertexData(long struct, VkDeviceOrHostAddressConstKHR value)Unsafe version ofvertexData.static intnvertexFormat(long struct)Unsafe version ofvertexFormat().static voidnvertexFormat(long struct, int value)Unsafe version ofvertexFormat.static longnvertexStride(long struct)Unsafe version ofvertexStride().static voidnvertexStride(long struct, long value)Unsafe version ofvertexStride.longpNext()NULLor a pointer to a structure extending this structure.VkAccelerationStructureGeometryTrianglesDataKHRpNext(long value)Sets the specified value to thepNext()field.VkAccelerationStructureGeometryTrianglesDataKHRpNext(VkAccelerationStructureGeometryMotionTrianglesDataNV value)Prepends the specifiedVkAccelerationStructureGeometryMotionTrianglesDataNVvalue to thepNextchain.VkAccelerationStructureGeometryTrianglesDataKHRset(int sType, long pNext, int vertexFormat, VkDeviceOrHostAddressConstKHR vertexData, long vertexStride, int maxVertex, int indexType, VkDeviceOrHostAddressConstKHR indexData, VkDeviceOrHostAddressConstKHR transformData)Initializes this struct with the specified values.VkAccelerationStructureGeometryTrianglesDataKHRset(VkAccelerationStructureGeometryTrianglesDataKHR src)Copies the specified struct data to this struct.intsizeof()intsType()the type of this structure.VkAccelerationStructureGeometryTrianglesDataKHRsType(int value)Sets the specified value to thesType()field.VkAccelerationStructureGeometryTrianglesDataKHRsType$Default()Sets theSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHRvalue to thesType()field.VkDeviceOrHostAddressConstKHRtransformData()a device or host address to memory containing an optional reference to aVkTransformMatrixKHRstructure describing a transformation from the space in which the vertices in this geometry are described to the space in which the acceleration structure is defined.VkAccelerationStructureGeometryTrianglesDataKHRtransformData(java.util.function.Consumer<VkDeviceOrHostAddressConstKHR> consumer)Passes thetransformData()field to the specifiedConsumer.VkAccelerationStructureGeometryTrianglesDataKHRtransformData(VkDeviceOrHostAddressConstKHR value)Copies the specifiedVkDeviceOrHostAddressConstKHRto thetransformData()field.VkDeviceOrHostAddressConstKHRvertexData()a device or host address to memory containing vertex data for this geometry.VkAccelerationStructureGeometryTrianglesDataKHRvertexData(java.util.function.Consumer<VkDeviceOrHostAddressConstKHR> consumer)Passes thevertexData()field to the specifiedConsumer.VkAccelerationStructureGeometryTrianglesDataKHRvertexData(VkDeviceOrHostAddressConstKHR value)Copies the specifiedVkDeviceOrHostAddressConstKHRto thevertexData()field.intvertexFormat()theVkFormatof each vertex element.VkAccelerationStructureGeometryTrianglesDataKHRvertexFormat(int value)Sets the specified value to thevertexFormat()field.longvertexStride()the stride in bytes between each vertex.VkAccelerationStructureGeometryTrianglesDataKHRvertexStride(long value)Sets the specified value to thevertexStride()field.
-
-
-
Constructor Detail
-
VkAccelerationStructureGeometryTrianglesDataKHR
public VkAccelerationStructureGeometryTrianglesDataKHR(java.nio.ByteBuffer container)
Creates aVkAccelerationStructureGeometryTrianglesDataKHRinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct
-
sType
public int sType()
the type of this structure.
-
pNext
public long pNext()
NULLor a pointer to a structure extending this structure.
-
vertexFormat
public int vertexFormat()
theVkFormatof each vertex element.
-
vertexData
public VkDeviceOrHostAddressConstKHR vertexData()
a device or host address to memory containing vertex data for this geometry.
-
vertexStride
public long vertexStride()
the stride in bytes between each vertex.
-
maxVertex
public int maxVertex()
the highest index of a vertex that will be addressed by a build command using this structure.
-
indexType
public int indexType()
theVkIndexTypeof each index element.
-
indexData
public VkDeviceOrHostAddressConstKHR indexData()
a device or host address to memory containing index data for this geometry.
-
transformData
public VkDeviceOrHostAddressConstKHR transformData()
a device or host address to memory containing an optional reference to aVkTransformMatrixKHRstructure describing a transformation from the space in which the vertices in this geometry are described to the space in which the acceleration structure is defined.
-
sType
public VkAccelerationStructureGeometryTrianglesDataKHR sType(int value)
Sets the specified value to thesType()field.
-
sType$Default
public VkAccelerationStructureGeometryTrianglesDataKHR sType$Default()
Sets theSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHRvalue to thesType()field.
-
pNext
public VkAccelerationStructureGeometryTrianglesDataKHR pNext(long value)
Sets the specified value to thepNext()field.
-
pNext
public VkAccelerationStructureGeometryTrianglesDataKHR pNext(VkAccelerationStructureGeometryMotionTrianglesDataNV value)
Prepends the specifiedVkAccelerationStructureGeometryMotionTrianglesDataNVvalue to thepNextchain.
-
vertexFormat
public VkAccelerationStructureGeometryTrianglesDataKHR vertexFormat(int value)
Sets the specified value to thevertexFormat()field.
-
vertexData
public VkAccelerationStructureGeometryTrianglesDataKHR vertexData(VkDeviceOrHostAddressConstKHR value)
Copies the specifiedVkDeviceOrHostAddressConstKHRto thevertexData()field.
-
vertexData
public VkAccelerationStructureGeometryTrianglesDataKHR vertexData(java.util.function.Consumer<VkDeviceOrHostAddressConstKHR> consumer)
Passes thevertexData()field to the specifiedConsumer.
-
vertexStride
public VkAccelerationStructureGeometryTrianglesDataKHR vertexStride(long value)
Sets the specified value to thevertexStride()field.
-
maxVertex
public VkAccelerationStructureGeometryTrianglesDataKHR maxVertex(int value)
Sets the specified value to themaxVertex()field.
-
indexType
public VkAccelerationStructureGeometryTrianglesDataKHR indexType(int value)
Sets the specified value to theindexType()field.
-
indexData
public VkAccelerationStructureGeometryTrianglesDataKHR indexData(VkDeviceOrHostAddressConstKHR value)
Copies the specifiedVkDeviceOrHostAddressConstKHRto theindexData()field.
-
indexData
public VkAccelerationStructureGeometryTrianglesDataKHR indexData(java.util.function.Consumer<VkDeviceOrHostAddressConstKHR> consumer)
Passes theindexData()field to the specifiedConsumer.
-
transformData
public VkAccelerationStructureGeometryTrianglesDataKHR transformData(VkDeviceOrHostAddressConstKHR value)
Copies the specifiedVkDeviceOrHostAddressConstKHRto thetransformData()field.
-
transformData
public VkAccelerationStructureGeometryTrianglesDataKHR transformData(java.util.function.Consumer<VkDeviceOrHostAddressConstKHR> consumer)
Passes thetransformData()field to the specifiedConsumer.
-
set
public VkAccelerationStructureGeometryTrianglesDataKHR set(int sType, long pNext, int vertexFormat, VkDeviceOrHostAddressConstKHR vertexData, long vertexStride, int maxVertex, int indexType, VkDeviceOrHostAddressConstKHR indexData, VkDeviceOrHostAddressConstKHR transformData)
Initializes this struct with the specified values.
-
set
public VkAccelerationStructureGeometryTrianglesDataKHR set(VkAccelerationStructureGeometryTrianglesDataKHR src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkAccelerationStructureGeometryTrianglesDataKHR malloc()
Returns a newVkAccelerationStructureGeometryTrianglesDataKHRinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkAccelerationStructureGeometryTrianglesDataKHR calloc()
Returns a newVkAccelerationStructureGeometryTrianglesDataKHRinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkAccelerationStructureGeometryTrianglesDataKHR create()
Returns a newVkAccelerationStructureGeometryTrianglesDataKHRinstance allocated withBufferUtils.
-
create
public static VkAccelerationStructureGeometryTrianglesDataKHR create(long address)
Returns a newVkAccelerationStructureGeometryTrianglesDataKHRinstance for the specified memory address.
-
createSafe
@Nullable public static VkAccelerationStructureGeometryTrianglesDataKHR createSafe(long address)
-
malloc
public static VkAccelerationStructureGeometryTrianglesDataKHR.Buffer malloc(int capacity)
Returns a newVkAccelerationStructureGeometryTrianglesDataKHR.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkAccelerationStructureGeometryTrianglesDataKHR.Buffer calloc(int capacity)
Returns a newVkAccelerationStructureGeometryTrianglesDataKHR.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkAccelerationStructureGeometryTrianglesDataKHR.Buffer create(int capacity)
Returns a newVkAccelerationStructureGeometryTrianglesDataKHR.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkAccelerationStructureGeometryTrianglesDataKHR.Buffer create(long address, int capacity)
Create aVkAccelerationStructureGeometryTrianglesDataKHR.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkAccelerationStructureGeometryTrianglesDataKHR.Buffer createSafe(long address, int capacity)
-
malloc
public static VkAccelerationStructureGeometryTrianglesDataKHR malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkAccelerationStructureGeometryTrianglesDataKHRinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkAccelerationStructureGeometryTrianglesDataKHR calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkAccelerationStructureGeometryTrianglesDataKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkAccelerationStructureGeometryTrianglesDataKHR.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkAccelerationStructureGeometryTrianglesDataKHR.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VkAccelerationStructureGeometryTrianglesDataKHR.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkAccelerationStructureGeometryTrianglesDataKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nsType
public static int nsType(long struct)
Unsafe version ofsType().
-
npNext
public static long npNext(long struct)
Unsafe version ofpNext().
-
nvertexFormat
public static int nvertexFormat(long struct)
Unsafe version ofvertexFormat().
-
nvertexData
public static VkDeviceOrHostAddressConstKHR nvertexData(long struct)
Unsafe version ofvertexData().
-
nvertexStride
public static long nvertexStride(long struct)
Unsafe version ofvertexStride().
-
nmaxVertex
public static int nmaxVertex(long struct)
Unsafe version ofmaxVertex().
-
nindexType
public static int nindexType(long struct)
Unsafe version ofindexType().
-
nindexData
public static VkDeviceOrHostAddressConstKHR nindexData(long struct)
Unsafe version ofindexData().
-
ntransformData
public static VkDeviceOrHostAddressConstKHR ntransformData(long struct)
Unsafe version oftransformData().
-
nsType
public static void nsType(long struct, int value)Unsafe version ofsType.
-
npNext
public static void npNext(long struct, long value)Unsafe version ofpNext.
-
nvertexFormat
public static void nvertexFormat(long struct, int value)Unsafe version ofvertexFormat.
-
nvertexData
public static void nvertexData(long struct, VkDeviceOrHostAddressConstKHR value)Unsafe version ofvertexData.
-
nvertexStride
public static void nvertexStride(long struct, long value)Unsafe version ofvertexStride.
-
nmaxVertex
public static void nmaxVertex(long struct, int value)Unsafe version ofmaxVertex.
-
nindexType
public static void nindexType(long struct, int value)Unsafe version ofindexType.
-
nindexData
public static void nindexData(long struct, VkDeviceOrHostAddressConstKHR value)Unsafe version ofindexData.
-
ntransformData
public static void ntransformData(long struct, VkDeviceOrHostAddressConstKHR value)Unsafe version oftransformData.
-
-