Class VkAccelerationStructureTrianglesOpacityMicromapEXT
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
Description
If VkAccelerationStructureTrianglesOpacityMicromapEXT is included in the pNext chain of a VkAccelerationStructureGeometryTrianglesDataKHR structure, that geometry will reference that micromap.
For each triangle in the geometry, the acceleration structure build fetches an index from indexBuffer using indexType and indexStride. If that value is the unsigned cast of one of the values from VkOpacityMicromapSpecialIndexEXT then that triangle behaves as described for that special value in Ray Opacity Micromap. Otherwise that triangle uses the opacity micromap information from micromap at that index plus baseTriangle.
Only one of pUsageCounts or ppUsageCounts can be a valid pointer, the other must be NULL. The elements of the non-NULL array describe the total count used to build this geometry. For a given format and subdivisionLevel the number of triangles in this geometry matching those values after indirection and special index handling must be equal to the sum of matching count provided.
If micromap is NULL_HANDLE, then every value read from indexBuffer must be one of the values in VkOpacityMicromapSpecialIndexEXT.
Valid Usage
- Only one of
pUsageCountsorppUsageCountscan be a valid pointer, the other must beNULL
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXTindexTypemust be a validVkIndexTypevalue- If
usageCountsCountis not 0, andpUsageCountsis notNULL,pUsageCountsmust be a valid pointer to an array ofusageCountsCountVkMicromapUsageEXTstructures - If
usageCountsCountis not 0, andppUsageCountsis notNULL,ppUsageCountsmust be a valid pointer to an array ofusageCountsCountvalid pointers toVkMicromapUsageEXTstructures - If
micromapis notNULL_HANDLE,micromapmust be a validVkMicromapEXThandle
See Also
VkDeviceOrHostAddressConstKHR, VkMicromapUsageEXT
Layout
struct VkAccelerationStructureTrianglesOpacityMicromapEXT {
VkStructureType sType();
void * pNext();
VkIndexType indexType();
VkDeviceOrHostAddressConstKHR indexBuffer();
VkDeviceSize indexStride();
uint32_t baseTriangle();
uint32_t usageCountsCount();
VkMicromapUsageEXT const * pUsageCounts();
VkMicromapUsageEXT const * const * ppUsageCounts();
VkMicromapEXT micromap();
}-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn array ofVkAccelerationStructureTrianglesOpacityMicromapEXTstructs.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 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.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionCreates aVkAccelerationStructureTrianglesOpacityMicromapEXTinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionintthe base value added to the non-negative triangle indicesbaseTriangle(int value) Sets the specified value to thebaseTriangle()field.calloc()Returns a newVkAccelerationStructureTrianglesOpacityMicromapEXTinstance allocated withmemCalloc.calloc(int capacity) Returns a newVkAccelerationStructureTrianglesOpacityMicromapEXT.Bufferinstance allocated withmemCalloc.calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkAccelerationStructureTrianglesOpacityMicromapEXT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.calloc(org.lwjgl.system.MemoryStack stack) Returns a newVkAccelerationStructureTrianglesOpacityMicromapEXTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.create()Returns a newVkAccelerationStructureTrianglesOpacityMicromapEXTinstance allocated withBufferUtils.create(int capacity) Returns a newVkAccelerationStructureTrianglesOpacityMicromapEXT.Bufferinstance allocated withBufferUtils.create(long address) Returns a newVkAccelerationStructureTrianglesOpacityMicromapEXTinstance for the specified memory address.create(long address, int capacity) Create aVkAccelerationStructureTrianglesOpacityMicromapEXT.Bufferinstance at the specified memory.static @Nullable VkAccelerationStructureTrianglesOpacityMicromapEXTcreateSafe(long address) static @Nullable VkAccelerationStructureTrianglesOpacityMicromapEXT.BuffercreateSafe(long address, int capacity) the address containing the triangle indicesindexBuffer(Consumer<VkDeviceOrHostAddressConstKHR> consumer) Passes theindexBuffer()field to the specifiedConsumer.Copies the specifiedVkDeviceOrHostAddressConstKHRto theindexBuffer()field.longthe byte stride between triangle indicesindexStride(long value) Sets the specified value to theindexStride()field.intthe type of triangle indices used when indexing this micromapindexType(int value) Sets the specified value to theindexType()field.malloc()Returns a newVkAccelerationStructureTrianglesOpacityMicromapEXTinstance allocated withmemAlloc.malloc(int capacity) Returns a newVkAccelerationStructureTrianglesOpacityMicromapEXT.Bufferinstance allocated withmemAlloc.malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkAccelerationStructureTrianglesOpacityMicromapEXT.Bufferinstance allocated on the specifiedMemoryStack.malloc(org.lwjgl.system.MemoryStack stack) Returns a newVkAccelerationStructureTrianglesOpacityMicromapEXTinstance allocated on the specifiedMemoryStack.longmicromap()the handle to the micromap object to include in this geometrymicromap(long value) Sets the specified value to themicromap()field.static intnbaseTriangle(long struct) Unsafe version ofbaseTriangle().static voidnbaseTriangle(long struct, int value) Unsafe version ofbaseTriangle.nindexBuffer(long struct) Unsafe version ofindexBuffer().static voidnindexBuffer(long struct, VkDeviceOrHostAddressConstKHR value) Unsafe version ofindexBuffer.static longnindexStride(long struct) Unsafe version ofindexStride().static voidnindexStride(long struct, long value) Unsafe version ofindexStride.static intnindexType(long struct) Unsafe version ofindexType().static voidnindexType(long struct, int value) Unsafe version ofindexType.static longnmicromap(long struct) Unsafe version ofmicromap().static voidnmicromap(long struct, long value) Unsafe version ofmicromap.static longnpNext(long struct) Unsafe version ofpNext().static voidnpNext(long struct, long value) Unsafe version ofpNext.static @Nullable org.lwjgl.PointerBuffernppUsageCounts(long struct) Unsafe version ofppUsageCounts.static voidnppUsageCounts(long struct, @Nullable org.lwjgl.PointerBuffer value) Unsafe version ofppUsageCounts.static @Nullable VkMicromapUsageEXT.BuffernpUsageCounts(long struct) Unsafe version ofpUsageCounts().static voidnpUsageCounts(long struct, @Nullable VkMicromapUsageEXT.Buffer value) Unsafe version ofpUsageCounts.static intnsType(long struct) Unsafe version ofsType().static voidnsType(long struct, int value) Unsafe version ofsType.static intnusageCountsCount(long struct) Unsafe version ofusageCountsCount().static voidnusageCountsCount(long struct, int value) Sets the specified value to theusageCountsCountfield of the specifiedstruct.longpNext()NULLor a pointer to a structure extending this structure.pNext(long value) Sets the specified value to thepNext()field.@Nullable org.lwjgl.PointerBuffera pointer to an array of pointers toVkMicromapUsageEXTstructures.ppUsageCounts(@Nullable org.lwjgl.PointerBuffer value) Sets the address of the specifiedPointerBufferto theppUsageCounts()field.@Nullable VkMicromapUsageEXT.Buffera pointer to an array ofVkMicromapUsageEXTstructures.pUsageCounts(@Nullable VkMicromapUsageEXT.Buffer value) Sets the address of the specifiedVkMicromapUsageEXT.Bufferto thepUsageCounts()field.set(int sType, long pNext, int indexType, VkDeviceOrHostAddressConstKHR indexBuffer, long indexStride, int baseTriangle, int usageCountsCount, @Nullable VkMicromapUsageEXT.Buffer pUsageCounts, @Nullable org.lwjgl.PointerBuffer ppUsageCounts, long micromap) 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_TRIANGLES_OPACITY_MICROMAP_EXTvalue to thesType()field.intspecifies the number of usage counts structures that will be used to determine the size of this micromap.usageCountsCount(int value) Sets the specified value to theusageCountsCount()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. -
INDEXTYPE
public static final int INDEXTYPEThe struct member offsets. -
INDEXBUFFER
public static final int INDEXBUFFERThe struct member offsets. -
INDEXSTRIDE
public static final int INDEXSTRIDEThe struct member offsets. -
BASETRIANGLE
public static final int BASETRIANGLEThe struct member offsets. -
USAGECOUNTSCOUNT
public static final int USAGECOUNTSCOUNTThe struct member offsets. -
PUSAGECOUNTS
public static final int PUSAGECOUNTSThe struct member offsets. -
PPUSAGECOUNTS
public static final int PPUSAGECOUNTSThe struct member offsets. -
MICROMAP
public static final int MICROMAPThe struct member offsets.
-
-
Constructor Details
-
VkAccelerationStructureTrianglesOpacityMicromapEXT
Creates aVkAccelerationStructureTrianglesOpacityMicromapEXTinstance 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<VkAccelerationStructureTrianglesOpacityMicromapEXT>
-
sType
public int sType()aVkStructureTypevalue identifying this structure. -
pNext
public long pNext()NULLor a pointer to a structure extending this structure. -
indexType
public int indexType()the type of triangle indices used when indexing this micromap -
indexBuffer
the address containing the triangle indices -
indexStride
public long indexStride()the byte stride between triangle indices -
baseTriangle
public int baseTriangle()the base value added to the non-negative triangle indices -
usageCountsCount
public int usageCountsCount()specifies the number of usage counts structures that will be used to determine the size of this micromap. -
pUsageCounts
a pointer to an array ofVkMicromapUsageEXTstructures. -
ppUsageCounts
public @Nullable org.lwjgl.PointerBuffer ppUsageCounts()a pointer to an array of pointers toVkMicromapUsageEXTstructures. -
micromap
public long micromap()the handle to the micromap object to include in this geometry -
sType
Sets the specified value to thesType()field. -
sType$Default
Sets theSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXTvalue to thesType()field. -
pNext
Sets the specified value to thepNext()field. -
indexType
Sets the specified value to theindexType()field. -
indexBuffer
public VkAccelerationStructureTrianglesOpacityMicromapEXT indexBuffer(VkDeviceOrHostAddressConstKHR value) Copies the specifiedVkDeviceOrHostAddressConstKHRto theindexBuffer()field. -
indexBuffer
public VkAccelerationStructureTrianglesOpacityMicromapEXT indexBuffer(Consumer<VkDeviceOrHostAddressConstKHR> consumer) Passes theindexBuffer()field to the specifiedConsumer. -
indexStride
Sets the specified value to theindexStride()field. -
baseTriangle
Sets the specified value to thebaseTriangle()field. -
usageCountsCount
Sets the specified value to theusageCountsCount()field. -
pUsageCounts
public VkAccelerationStructureTrianglesOpacityMicromapEXT pUsageCounts(@Nullable VkMicromapUsageEXT.Buffer value) Sets the address of the specifiedVkMicromapUsageEXT.Bufferto thepUsageCounts()field. -
ppUsageCounts
public VkAccelerationStructureTrianglesOpacityMicromapEXT ppUsageCounts(@Nullable org.lwjgl.PointerBuffer value) Sets the address of the specifiedPointerBufferto theppUsageCounts()field. -
micromap
Sets the specified value to themicromap()field. -
set
public VkAccelerationStructureTrianglesOpacityMicromapEXT set(int sType, long pNext, int indexType, VkDeviceOrHostAddressConstKHR indexBuffer, long indexStride, int baseTriangle, int usageCountsCount, @Nullable VkMicromapUsageEXT.Buffer pUsageCounts, @Nullable org.lwjgl.PointerBuffer ppUsageCounts, long micromap) Initializes this struct with the specified values. -
set
public VkAccelerationStructureTrianglesOpacityMicromapEXT set(VkAccelerationStructureTrianglesOpacityMicromapEXT src) Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newVkAccelerationStructureTrianglesOpacityMicromapEXTinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkAccelerationStructureTrianglesOpacityMicromapEXTinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkAccelerationStructureTrianglesOpacityMicromapEXTinstance allocated withBufferUtils. -
create
Returns a newVkAccelerationStructureTrianglesOpacityMicromapEXTinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkAccelerationStructureTrianglesOpacityMicromapEXT.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkAccelerationStructureTrianglesOpacityMicromapEXT.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkAccelerationStructureTrianglesOpacityMicromapEXT.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkAccelerationStructureTrianglesOpacityMicromapEXT.Buffer create(long address, int capacity) Create aVkAccelerationStructureTrianglesOpacityMicromapEXT.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
public static @Nullable VkAccelerationStructureTrianglesOpacityMicromapEXT.Buffer createSafe(long address, int capacity) -
malloc
public static VkAccelerationStructureTrianglesOpacityMicromapEXT malloc(org.lwjgl.system.MemoryStack stack) Returns a newVkAccelerationStructureTrianglesOpacityMicromapEXTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkAccelerationStructureTrianglesOpacityMicromapEXT calloc(org.lwjgl.system.MemoryStack stack) Returns a newVkAccelerationStructureTrianglesOpacityMicromapEXTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkAccelerationStructureTrianglesOpacityMicromapEXT.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkAccelerationStructureTrianglesOpacityMicromapEXT.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
public static VkAccelerationStructureTrianglesOpacityMicromapEXT.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkAccelerationStructureTrianglesOpacityMicromapEXT.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(). -
nindexType
public static int nindexType(long struct) Unsafe version ofindexType(). -
nindexBuffer
Unsafe version ofindexBuffer(). -
nindexStride
public static long nindexStride(long struct) Unsafe version ofindexStride(). -
nbaseTriangle
public static int nbaseTriangle(long struct) Unsafe version ofbaseTriangle(). -
nusageCountsCount
public static int nusageCountsCount(long struct) Unsafe version ofusageCountsCount(). -
npUsageCounts
Unsafe version ofpUsageCounts(). -
nppUsageCounts
public static @Nullable org.lwjgl.PointerBuffer nppUsageCounts(long struct) Unsafe version ofppUsageCounts. -
nmicromap
public static long nmicromap(long struct) Unsafe version ofmicromap(). -
nsType
public static void nsType(long struct, int value) Unsafe version ofsType. -
npNext
public static void npNext(long struct, long value) Unsafe version ofpNext. -
nindexType
public static void nindexType(long struct, int value) Unsafe version ofindexType. -
nindexBuffer
Unsafe version ofindexBuffer. -
nindexStride
public static void nindexStride(long struct, long value) Unsafe version ofindexStride. -
nbaseTriangle
public static void nbaseTriangle(long struct, int value) Unsafe version ofbaseTriangle. -
nusageCountsCount
public static void nusageCountsCount(long struct, int value) Sets the specified value to theusageCountsCountfield of the specifiedstruct. -
npUsageCounts
Unsafe version ofpUsageCounts. -
nppUsageCounts
public static void nppUsageCounts(long struct, @Nullable org.lwjgl.PointerBuffer value) Unsafe version ofppUsageCounts. -
nmicromap
public static void nmicromap(long struct, long value) Unsafe version ofmicromap.
-