Top Description Inners Fields Constructors Methods
org.lwjgl.vulkan

public Class VkAccelerationStructureTrianglesOpacityMicromapEXT

extends Struct<VkAccelerationStructureTrianglesOpacityMicromapEXT>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Structure specifying an opacity micromap in a bottom-level acceleration structure.
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
Valid Usage (Implicit)
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 and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
BASETRIANGLE

The struct member offsets.

public static final int
INDEXBUFFER

The struct member offsets.

public static final int
INDEXSTRIDE

The struct member offsets.

public static final int
INDEXTYPE

The struct member offsets.

public static final int
MICROMAP

The struct member offsets.

public static final int
PNEXT

The struct member offsets.

public static final int
PPUSAGECOUNTS

The struct member offsets.

public static final int
PUSAGECOUNTS

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
STYPE

The struct member offsets.

public static final int
USAGECOUNTSCOUNT

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
public
VkAccelerationStructureTrianglesOpacityMicromapEXT(ByteBuffer container)

Creates a VkAccelerationStructureTrianglesOpacityMicromapEXT instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public int
baseTriangle()

the base value added to the non-negative triangle indices

public VkAccelerationStructureTrianglesOpacityMicromapEXT
baseTriangle(int value)

Sets the specified value to the baseTriangle field.

public static VkAccelerationStructureTrianglesOpacityMicromapEXT
calloc()

Returns a new VkAccelerationStructureTrianglesOpacityMicromapEXT instance allocated with memCalloc.

public static VkAccelerationStructureTrianglesOpacityMicromapEXT.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new VkAccelerationStructureTrianglesOpacityMicromapEXT.Buffer instance allocated with memCalloc.

public static VkAccelerationStructureTrianglesOpacityMicromapEXT
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VkAccelerationStructureTrianglesOpacityMicromapEXT instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static VkAccelerationStructureTrianglesOpacityMicromapEXT.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VkAccelerationStructureTrianglesOpacityMicromapEXT.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

protected VkAccelerationStructureTrianglesOpacityMicromapEXT
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static VkAccelerationStructureTrianglesOpacityMicromapEXT
create()

Returns a new VkAccelerationStructureTrianglesOpacityMicromapEXT instance allocated with BufferUtils.

public static VkAccelerationStructureTrianglesOpacityMicromapEXT
create(long address)

Returns a new VkAccelerationStructureTrianglesOpacityMicromapEXT instance for the specified memory address.

public static VkAccelerationStructureTrianglesOpacityMicromapEXT.Buffer
create(int
the buffer capacity
capacity
)

Returns a new VkAccelerationStructureTrianglesOpacityMicromapEXT.Buffer instance allocated with BufferUtils.

public static VkAccelerationStructureTrianglesOpacityMicromapEXT.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a VkAccelerationStructureTrianglesOpacityMicromapEXT.Buffer instance at the specified memory.

public static VkAccelerationStructureTrianglesOpacityMicromapEXT
createSafe(long address)

Like create, but returns null if address is NULL.

public static VkAccelerationStructureTrianglesOpacityMicromapEXT.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public VkDeviceOrHostAddressConstKHR
indexBuffer()

the address containing the triangle indices

public VkAccelerationStructureTrianglesOpacityMicromapEXT
public VkAccelerationStructureTrianglesOpacityMicromapEXT
indexBuffer(Consumer<VkDeviceOrHostAddressConstKHR> consumer)

Passes the indexBuffer field to the specified Consumer.

public long
indexStride()

the byte stride between triangle indices

public VkAccelerationStructureTrianglesOpacityMicromapEXT
indexStride(long value)

Sets the specified value to the indexStride field.

public int
indexType()

the type of triangle indices used when indexing this micromap

public VkAccelerationStructureTrianglesOpacityMicromapEXT
indexType(int value)

Sets the specified value to the indexType field.

public static VkAccelerationStructureTrianglesOpacityMicromapEXT
malloc()

Returns a new VkAccelerationStructureTrianglesOpacityMicromapEXT instance allocated with memAlloc.

public static VkAccelerationStructureTrianglesOpacityMicromapEXT.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new VkAccelerationStructureTrianglesOpacityMicromapEXT.Buffer instance allocated with memAlloc.

public static VkAccelerationStructureTrianglesOpacityMicromapEXT
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VkAccelerationStructureTrianglesOpacityMicromapEXT instance allocated on the specified MemoryStack.

public static VkAccelerationStructureTrianglesOpacityMicromapEXT.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VkAccelerationStructureTrianglesOpacityMicromapEXT.Buffer instance allocated on the specified MemoryStack.

public long
micromap()

the handle to the micromap object to include in this geometry

public VkAccelerationStructureTrianglesOpacityMicromapEXT
micromap(long value)

Sets the specified value to the micromap field.

public static int
nbaseTriangle(long struct)

Unsafe version of baseTriangle.

public static void
nbaseTriangle(long struct, int value)

Unsafe version of baseTriangle.

public static VkDeviceOrHostAddressConstKHR
nindexBuffer(long struct)

Unsafe version of indexBuffer.

public static void
nindexBuffer(long struct, VkDeviceOrHostAddressConstKHR value)

Unsafe version of indexBuffer.

public static long
nindexStride(long struct)

Unsafe version of indexStride.

public static void
nindexStride(long struct, long value)

Unsafe version of indexStride.

public static int
nindexType(long struct)

Unsafe version of indexType.

public static void
nindexType(long struct, int value)

Unsafe version of indexType.

public static long
nmicromap(long struct)

Unsafe version of micromap.

public static void
nmicromap(long struct, long value)

Unsafe version of micromap.

public static long
npNext(long struct)

Unsafe version of pNext.

public static void
npNext(long struct, long value)

Unsafe version of pNext.

public static PointerBuffer
nppUsageCounts(long struct)

Unsafe version of ppUsageCounts.

public static void
nppUsageCounts(long struct, PointerBuffer value)

Unsafe version of ppUsageCounts.

public static VkMicromapUsageEXT.Buffer
npUsageCounts(long struct)

Unsafe version of pUsageCounts.

public static void
npUsageCounts(long struct, VkMicromapUsageEXT.Buffer value)

Unsafe version of pUsageCounts.

public static int
nsType(long struct)

Unsafe version of sType.

public static void
nsType(long struct, int value)

Unsafe version of sType.

public static int
nusageCountsCount(long struct)

Unsafe version of usageCountsCount.

public static void
nusageCountsCount(long struct, int value)

Sets the specified value to the usageCountsCount field of the specified struct.

public long
pNext()

NULL or a pointer to a structure extending this structure.

public VkAccelerationStructureTrianglesOpacityMicromapEXT
pNext(long value)

Sets the specified value to the pNext field.

public PointerBuffer
ppUsageCounts()

a pointer to an array of pointers to VkMicromapUsageEXT structures.

public VkAccelerationStructureTrianglesOpacityMicromapEXT
ppUsageCounts(PointerBuffer value)

Sets the address of the specified PointerBuffer to the ppUsageCounts field.

public VkMicromapUsageEXT.Buffer
pUsageCounts()

a pointer to an array of VkMicromapUsageEXT structures.

public VkAccelerationStructureTrianglesOpacityMicromapEXT
pUsageCounts(VkMicromapUsageEXT.Buffer value)

Sets the address of the specified VkMicromapUsageEXT.Buffer to the pUsageCounts field.

public VkAccelerationStructureTrianglesOpacityMicromapEXT
set(int sType, long pNext, int indexType, VkDeviceOrHostAddressConstKHR indexBuffer, long indexStride, int baseTriangle, int usageCountsCount, VkMicromapUsageEXT.Buffer pUsageCounts, PointerBuffer ppUsageCounts, long micromap)

Initializes this struct with the specified values.

public VkAccelerationStructureTrianglesOpacityMicromapEXT

Returns:

this struct
set
(VkAccelerationStructureTrianglesOpacityMicromapEXT
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public int
sType()

a VkStructureType value identifying this structure.

public VkAccelerationStructureTrianglesOpacityMicromapEXT
sType(int value)

Sets the specified value to the sType field.

public VkAccelerationStructureTrianglesOpacityMicromapEXT
public int
usageCountsCount()

specifies the number of usage counts structures that will be used to determine the size of this micromap.

public VkAccelerationStructureTrianglesOpacityMicromapEXT
usageCountsCount(int value)

Sets the specified value to the usageCountsCount field.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate