Package org.lwjgl.vulkan
Class VkAccelerationStructureGeometryTrianglesDataKHR
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkAccelerationStructureGeometryTrianglesDataKHR>
org.lwjgl.vulkan.VkAccelerationStructureGeometryTrianglesDataKHR
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkAccelerationStructureGeometryTrianglesDataKHR
extends org.lwjgl.system.Struct<VkAccelerationStructureGeometryTrianglesDataKHR>
implements org.lwjgl.system.NativeResource
Structure specifying a triangle geometry in a bottom-level acceleration structure.
Description
Note
Unlike the stride for vertex buffers in VkVertexInputBindingDescription for graphics pipelines which must not exceed maxVertexInputBindingStride, vertexStride for 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-1- The format features of
vertexFormatmust containFORMAT_FEATURE_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR indexTypemust beINDEX_TYPE_UINT16,INDEX_TYPE_UINT32, orINDEX_TYPE_NONE_KHR
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofVkAccelerationStructureGeometryMotionTrianglesDataNV,VkAccelerationStructureTrianglesDisplacementMicromapNV, orVkAccelerationStructureTrianglesOpacityMicromapEXT - The
sTypevalue of each struct in thepNextchain must be unique vertexFormatmust be a validVkFormatvalueindexTypemust be a validVkIndexTypevalue
See Also
VkAccelerationStructureGeometryDataKHR, VkDeviceOrHostAddressConstKHR
Layout
struct VkAccelerationStructureGeometryTrianglesDataKHR {
VkStructureType sType();
void const * pNext();
VkFormat vertexFormat();
VkDeviceOrHostAddressConstKHR vertexData();
VkDeviceSize vertexStride();
uint32_t maxVertex();
VkIndexType indexType();
VkDeviceOrHostAddressConstKHR indexData();
VkDeviceOrHostAddressConstKHR transformData();
}-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn array ofVkAccelerationStructureGeometryTrianglesDataKHRstructs.Nested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionCreates aVkAccelerationStructureGeometryTrianglesDataKHRinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptioncalloc()Returns a newVkAccelerationStructureGeometryTrianglesDataKHRinstance allocated withmemCalloc.calloc(int capacity) Returns a newVkAccelerationStructureGeometryTrianglesDataKHR.Bufferinstance allocated withmemCalloc.calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkAccelerationStructureGeometryTrianglesDataKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.calloc(org.lwjgl.system.MemoryStack stack) Returns a newVkAccelerationStructureGeometryTrianglesDataKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.create()Returns a newVkAccelerationStructureGeometryTrianglesDataKHRinstance allocated withBufferUtils.create(int capacity) Returns a newVkAccelerationStructureGeometryTrianglesDataKHR.Bufferinstance allocated withBufferUtils.create(long address) Returns a newVkAccelerationStructureGeometryTrianglesDataKHRinstance for the specified memory address.create(long address, int capacity) Create aVkAccelerationStructureGeometryTrianglesDataKHR.Bufferinstance at the specified memory.static @Nullable VkAccelerationStructureGeometryTrianglesDataKHRcreateSafe(long address) static @Nullable VkAccelerationStructureGeometryTrianglesDataKHR.BuffercreateSafe(long address, int capacity) a device or host address to memory containing index data for this geometry.indexData(Consumer<VkDeviceOrHostAddressConstKHR> consumer) Passes theindexData()field to the specifiedConsumer.Copies the specifiedVkDeviceOrHostAddressConstKHRto theindexData()field.inttheVkIndexTypeof each index element.indexType(int value) Sets the specified value to theindexType()field.malloc()Returns a newVkAccelerationStructureGeometryTrianglesDataKHRinstance allocated withmemAlloc.malloc(int capacity) Returns a newVkAccelerationStructureGeometryTrianglesDataKHR.Bufferinstance allocated withmemAlloc.malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkAccelerationStructureGeometryTrianglesDataKHR.Bufferinstance allocated on the specifiedMemoryStack.malloc(org.lwjgl.system.MemoryStack stack) Returns a newVkAccelerationStructureGeometryTrianglesDataKHRinstance allocated on the specifiedMemoryStack.intthe number of vertices invertexDataminus one.maxVertex(int value) Sets the specified value to themaxVertex()field.nindexData(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.ntransformData(long struct) Unsafe version oftransformData().static voidntransformData(long struct, VkDeviceOrHostAddressConstKHR value) Unsafe version oftransformData.nvertexData(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.pNext(long value) Sets the specified value to thepNext()field.Prepends the specifiedVkAccelerationStructureGeometryMotionTrianglesDataNVvalue to thepNextchain.Prepends the specifiedVkAccelerationStructureTrianglesDisplacementMicromapNVvalue to thepNextchain.Prepends the specifiedVkAccelerationStructureTrianglesOpacityMicromapEXTvalue to thepNextchain.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.Copies the specified struct data to this struct.intsizeof()intsType()aVkStructureTypevalue identifying this structure.sType(int value) Sets the specified value to thesType()field.Sets theSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHRvalue to thesType()field.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.transformData(Consumer<VkDeviceOrHostAddressConstKHR> consumer) Passes thetransformData()field to the specifiedConsumer.Copies the specifiedVkDeviceOrHostAddressConstKHRto thetransformData()field.a device or host address to memory containing vertex data for this geometry.vertexData(Consumer<VkDeviceOrHostAddressConstKHR> consumer) Passes thevertexData()field to the specifiedConsumer.Copies the specifiedVkDeviceOrHostAddressConstKHRto thevertexData()field.inttheVkFormatof each vertex element.vertexFormat(int value) Sets the specified value to thevertexFormat()field.longthe stride in bytes between each vertex.vertexStride(long value) Sets the specified value to thevertexStride()field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
STYPE
public static final int STYPEThe struct member offsets. -
PNEXT
public static final int PNEXTThe struct member offsets. -
VERTEXFORMAT
public static final int VERTEXFORMATThe struct member offsets. -
VERTEXDATA
public static final int VERTEXDATAThe struct member offsets. -
VERTEXSTRIDE
public static final int VERTEXSTRIDEThe struct member offsets. -
MAXVERTEX
public static final int MAXVERTEXThe struct member offsets. -
INDEXTYPE
public static final int INDEXTYPEThe struct member offsets. -
INDEXDATA
public static final int INDEXDATAThe struct member offsets. -
TRANSFORMDATA
public static final int TRANSFORMDATAThe struct member offsets.
-
-
Constructor Details
-
VkAccelerationStructureGeometryTrianglesDataKHR
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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<VkAccelerationStructureGeometryTrianglesDataKHR>
-
sType
public int sType()aVkStructureTypevalue identifying this structure. -
pNext
public long pNext()NULLor a pointer to a structure extending this structure. -
vertexFormat
public int vertexFormat()theVkFormatof each vertex element. -
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 number of vertices invertexDataminus one. -
indexType
public int indexType()theVkIndexTypeof each index element. -
indexData
a device or host address to memory containing index data for this geometry. -
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
Sets the specified value to thesType()field. -
sType$Default
Sets theSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHRvalue to thesType()field. -
pNext
Sets the specified value to thepNext()field. -
pNext
public VkAccelerationStructureGeometryTrianglesDataKHR pNext(VkAccelerationStructureGeometryMotionTrianglesDataNV value) Prepends the specifiedVkAccelerationStructureGeometryMotionTrianglesDataNVvalue to thepNextchain. -
pNext
public VkAccelerationStructureGeometryTrianglesDataKHR pNext(VkAccelerationStructureTrianglesDisplacementMicromapNV value) Prepends the specifiedVkAccelerationStructureTrianglesDisplacementMicromapNVvalue to thepNextchain. -
pNext
public VkAccelerationStructureGeometryTrianglesDataKHR pNext(VkAccelerationStructureTrianglesOpacityMicromapEXT value) Prepends the specifiedVkAccelerationStructureTrianglesOpacityMicromapEXTvalue to thepNextchain. -
vertexFormat
Sets the specified value to thevertexFormat()field. -
vertexData
public VkAccelerationStructureGeometryTrianglesDataKHR vertexData(VkDeviceOrHostAddressConstKHR value) Copies the specifiedVkDeviceOrHostAddressConstKHRto thevertexData()field. -
vertexData
public VkAccelerationStructureGeometryTrianglesDataKHR vertexData(Consumer<VkDeviceOrHostAddressConstKHR> consumer) Passes thevertexData()field to the specifiedConsumer. -
vertexStride
Sets the specified value to thevertexStride()field. -
maxVertex
Sets the specified value to themaxVertex()field. -
indexType
Sets the specified value to theindexType()field. -
indexData
public VkAccelerationStructureGeometryTrianglesDataKHR indexData(VkDeviceOrHostAddressConstKHR value) Copies the specifiedVkDeviceOrHostAddressConstKHRto theindexData()field. -
indexData
public VkAccelerationStructureGeometryTrianglesDataKHR indexData(Consumer<VkDeviceOrHostAddressConstKHR> consumer) Passes theindexData()field to the specifiedConsumer. -
transformData
public VkAccelerationStructureGeometryTrianglesDataKHR transformData(VkDeviceOrHostAddressConstKHR value) Copies the specifiedVkDeviceOrHostAddressConstKHRto thetransformData()field. -
transformData
public VkAccelerationStructureGeometryTrianglesDataKHR transformData(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
Returns a newVkAccelerationStructureGeometryTrianglesDataKHRinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkAccelerationStructureGeometryTrianglesDataKHRinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkAccelerationStructureGeometryTrianglesDataKHRinstance allocated withBufferUtils. -
create
Returns a newVkAccelerationStructureGeometryTrianglesDataKHRinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkAccelerationStructureGeometryTrianglesDataKHR.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkAccelerationStructureGeometryTrianglesDataKHR.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
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
public static @Nullable 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:
capacity- the buffer capacitystack- the stack from which to allocate
-
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:
capacity- the buffer capacitystack- the stack from which to allocate
-
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
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
Unsafe version ofindexData(). -
ntransformData
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
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
Unsafe version ofindexData. -
ntransformData
Unsafe version oftransformData.
-