The C language specification does not define the ordering of bit-fields, but in practice, this struct produces the correct layout with existing compilers. The intended bit pattern is for the following:
instanceCustomIndex and mask occupy the same memory as if a single uint32_t was specified in their place
instanceCustomIndex occupies the 24 least significant bits of that memorymask occupies the 8 most significant bits of that memoryinstanceShaderBindingTableRecordOffset and flags occupy the same memory as if a single uint32_t was specified in their place
instanceShaderBindingTableRecordOffset occupies the 24 least significant bits of that memoryflags occupies the 8 most significant bits of that memoryIf a compiler produces code that diverges from that pattern, applications must employ another method to set values according to the correct bit pattern.
The transform for a SRT motion instance at a point in time is derived from component-wise linear interpolation of the two SRT transforms. That is, for a time in [0,1] the resulting transform is
transformT0 × (1 - time) + transformT1 × timeflags must be a valid combination of VkGeometryInstanceFlagBitsKHR valuesVkAccelerationStructureMotionInstanceDataNV, VkSRTDataNV
struct VkAccelerationStructureSRTMotionInstanceNV {
VkSRTDataNV transformT0;
VkSRTDataNV transformT1;
uint32_t instanceCustomIndex : 24;
uint32_t mask : 8;
uint32_t instanceShaderBindingTableRecordOffset : 24;
VkGeometryInstanceFlagsKHR flags : 8;
uint64_t accelerationStructureReference;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ACCELERATIONSTRUCTUREREFERENCE
The struct member offsets. |
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | BITFIELD0
The struct member offsets. |
| public static final int | BITFIELD1
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| public static final int | TRANSFORMT0
The struct member offsets. |
| public static final int | TRANSFORMT1
The struct member offsets. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | VkAccelerationStructureSRTMotionInstanceNV(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public long | accelerationStructureReference()
either:
|
| public VkAccelerationStructureSRTMotionInstanceNV | accelerationStructureReference(long value)
Sets the specified value to the |
| public static VkAccelerationStructureSRTMotionInstanceNV | |
| public static VkAccelerationStructureSRTMotionInstanceNV. | calloc(int
the buffer capacity capacity)Returns a new |
| public static VkAccelerationStructureSRTMotionInstanceNV | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkAccelerationStructureSRTMotionInstanceNV. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| protected VkAccelerationStructureSRTMotionInstanceNV | create(long
the struct memory address address, ByteBuffer an optional container buffer, to be referenced strongly by the struct instance. container)Implements abstract org. the constructor, but returns the exact type of the Struct subclass.
|
| public static VkAccelerationStructureSRTMotionInstanceNV | create()
Returns a new |
| public static VkAccelerationStructureSRTMotionInstanceNV | create(long address)
Returns a new |
| public static VkAccelerationStructureSRTMotionInstanceNV. | create(int
the buffer capacity capacity)Returns a new |
| public static VkAccelerationStructureSRTMotionInstanceNV. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static VkAccelerationStructureSRTMotionInstanceNV | |
| public static VkAccelerationStructureSRTMotionInstanceNV. | |
| public int | |
| public VkAccelerationStructureSRTMotionInstanceNV | |
| public int | instanceCustomIndex()
a 24-bit user-specified index value accessible to ray shaders in the |
| public VkAccelerationStructureSRTMotionInstanceNV | |
| public int | instanceShaderBindingTableRecordOffset()
a 24-bit offset used in calculating the hit shader binding table index. |
| public VkAccelerationStructureSRTMotionInstanceNV | instanceShaderBindingTableRecordOffset(int value)
Sets the specified value to the |
| public static VkAccelerationStructureSRTMotionInstanceNV | |
| public static VkAccelerationStructureSRTMotionInstanceNV. | malloc(int
the buffer capacity capacity)Returns a new |
| public static VkAccelerationStructureSRTMotionInstanceNV | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkAccelerationStructureSRTMotionInstanceNV. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public int | |
| public VkAccelerationStructureSRTMotionInstanceNV | |
| public static long | |
| public static void | naccelerationStructureReference(long struct, long value)
Unsafe version of |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static int | ninstanceShaderBindingTableRecordOffset(long struct)
Unsafe version of |
| public static void | ninstanceShaderBindingTableRecordOffset(long struct, int value)
Unsafe version of |
| public static int | |
| public static void | |
| public static VkSRTDataNV | |
| public static void | |
| public static VkSRTDataNV | |
| public static void | |
| public VkAccelerationStructureSRTMotionInstanceNV | set(VkSRTDataNV transformT0, VkSRTDataNV transformT1, int instanceCustomIndex, int mask, int instanceShaderBindingTableRecordOffset, int flags, long accelerationStructureReference)
Initializes this struct with the specified values. |
| public VkAccelerationStructureSRTMotionInstanceNV | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public int | |
| public VkSRTDataNV | transformT0()
a |
| public VkAccelerationStructureSRTMotionInstanceNV | |
| public VkAccelerationStructureSRTMotionInstanceNV | |
| public VkSRTDataNV | transformT1()
a |
| public VkAccelerationStructureSRTMotionInstanceNV | |
| public VkAccelerationStructureSRTMotionInstanceNV |
| ACCELERATIONSTRUCTUREREFERENCE | back to summary |
|---|---|
| public static final int ACCELERATIONSTRUCTUREREFERENCE The struct member offsets. | |
| ALIGNOF | back to summary |
|---|---|
| public static final int ALIGNOF The struct alignment in bytes. | |
| BITFIELD0 | back to summary |
|---|---|
| public static final int BITFIELD0 The struct member offsets. | |
| BITFIELD1 | back to summary |
|---|---|
| public static final int BITFIELD1 The struct member offsets. | |
| SIZEOF | back to summary |
|---|---|
| public static final int SIZEOF The struct size in bytes. | |
| TRANSFORMT0 | back to summary |
|---|---|
| public static final int TRANSFORMT0 The struct member offsets. | |
| TRANSFORMT1 | back to summary |
|---|---|
| public static final int TRANSFORMT1 The struct member offsets. | |
| VkAccelerationStructureSRTMotionInstanceNV | back to summary |
|---|---|
| protected VkAccelerationStructureSRTMotionInstanceNV(long address, ByteBuffer container) | |
| VkAccelerationStructureSRTMotionInstanceNV | back to summary |
|---|---|
| public VkAccelerationStructureSRTMotionInstanceNV(ByteBuffer container) Creates a The created instance holds a strong reference to the container object. | |
| accelerationStructureReference | back to summary |
|---|---|
| public long accelerationStructureReference() either:
| |
| accelerationStructureReference | back to summary |
|---|---|
| public VkAccelerationStructureSRTMotionInstanceNV accelerationStructureReference(long value) Sets the specified value to the | |
| calloc | back to summary |
|---|---|
| public static VkAccelerationStructureSRTMotionInstanceNV calloc() Returns a new | |
| calloc | back to summary |
|---|---|
| public static VkAccelerationStructureSRTMotionInstanceNV. Returns a new
| |
| calloc | back to summary |
|---|---|
| public static VkAccelerationStructureSRTMotionInstanceNV calloc(MemoryStack stack) Returns a new
| |
| calloc | back to summary |
|---|---|
| public static VkAccelerationStructureSRTMotionInstanceNV. Returns a new
| |
| create | back to summary |
|---|---|
| protected VkAccelerationStructureSRTMotionInstanceNV create(long address, ByteBuffer container) Implements abstract org. Doc from org. Similar to Effectively, every
| |
| create | back to summary |
|---|---|
| public static VkAccelerationStructureSRTMotionInstanceNV create() Returns a new | |
| create | back to summary |
|---|---|
| public static VkAccelerationStructureSRTMotionInstanceNV create(long address) Returns a new | |
| create | back to summary |
|---|---|
| public static VkAccelerationStructureSRTMotionInstanceNV. Returns a new
| |
| create | back to summary |
|---|---|
| public static VkAccelerationStructureSRTMotionInstanceNV. Create a
| |
| createSafe | back to summary |
|---|---|
| public static VkAccelerationStructureSRTMotionInstanceNV createSafe(long address) Like
| |
| createSafe | back to summary |
|---|---|
| public static VkAccelerationStructureSRTMotionInstanceNV. Like
| |
| flags | back to summary |
|---|---|
| public int flags() an 8-bit mask of
| |
| flags | back to summary |
|---|---|
| public VkAccelerationStructureSRTMotionInstanceNV flags(int value) Sets the specified value to the | |
| instanceCustomIndex | back to summary |
|---|---|
| public int instanceCustomIndex() a 24-bit user-specified index value accessible to ray shaders in the
| |
| instanceCustomIndex | back to summary |
|---|---|
| public VkAccelerationStructureSRTMotionInstanceNV instanceCustomIndex(int value) Sets the specified value to the | |
| instanceShaderBindingTableRecordOffset | back to summary |
|---|---|
| public int instanceShaderBindingTableRecordOffset() a 24-bit offset used in calculating the hit shader binding table index.
| |
| instanceShaderBindingTableRecordOffset | back to summary |
|---|---|
| public VkAccelerationStructureSRTMotionInstanceNV instanceShaderBindingTableRecordOffset(int value) Sets the specified value to the | |
| malloc | back to summary |
|---|---|
| public static VkAccelerationStructureSRTMotionInstanceNV malloc() Returns a new | |
| malloc | back to summary |
|---|---|
| public static VkAccelerationStructureSRTMotionInstanceNV. Returns a new
| |
| malloc | back to summary |
|---|---|
| public static VkAccelerationStructureSRTMotionInstanceNV malloc(MemoryStack stack) Returns a new
| |
| malloc | back to summary |
|---|---|
| public static VkAccelerationStructureSRTMotionInstanceNV. Returns a new
| |
| mask | back to summary |
|---|---|
| public int mask() an 8-bit visibility mask for the geometry. The instance may only be hit if
| |
| mask | back to summary |
|---|---|
| public VkAccelerationStructureSRTMotionInstanceNV mask(int value) Sets the specified value to the | |
| naccelerationStructureReference | back to summary |
|---|---|
| public static long naccelerationStructureReference(long struct) Unsafe version of | |
| naccelerationStructureReference | back to summary |
|---|---|
| public static void naccelerationStructureReference(long struct, long value) Unsafe version of | |
| nbitfield0 | back to summary |
|---|---|
| public static int nbitfield0(long struct) | |
| nbitfield0 | back to summary |
|---|---|
| public static void nbitfield0(long struct, int value) | |
| nbitfield1 | back to summary |
|---|---|
| public static int nbitfield1(long struct) | |
| nbitfield1 | back to summary |
|---|---|
| public static void nbitfield1(long struct, int value) | |
| nflags | back to summary |
|---|---|
| public static int nflags(long struct) Unsafe version of | |
| nflags | back to summary |
|---|---|
| public static void nflags(long struct, int value) Unsafe version of | |
| ninstanceCustomIndex | back to summary |
|---|---|
| public static int ninstanceCustomIndex(long struct) Unsafe version of | |
| ninstanceCustomIndex | back to summary |
|---|---|
| public static void ninstanceCustomIndex(long struct, int value) Unsafe version of | |
| ninstanceShaderBindingTableRecordOffset | back to summary |
|---|---|
| public static int ninstanceShaderBindingTableRecordOffset(long struct) Unsafe version of | |
| ninstanceShaderBindingTableRecordOffset | back to summary |
|---|---|
| public static void ninstanceShaderBindingTableRecordOffset(long struct, int value) Unsafe version of | |
| nmask | back to summary |
|---|---|
| public static int nmask(long struct) Unsafe version of | |
| nmask | back to summary |
|---|---|
| public static void nmask(long struct, int value) Unsafe version of | |
| ntransformT0 | back to summary |
|---|---|
| public static VkSRTDataNV ntransformT0(long struct) Unsafe version of | |
| ntransformT0 | back to summary |
|---|---|
| public static void ntransformT0(long struct, VkSRTDataNV value) Unsafe version of | |
| ntransformT1 | back to summary |
|---|---|
| public static VkSRTDataNV ntransformT1(long struct) Unsafe version of | |
| ntransformT1 | back to summary |
|---|---|
| public static void ntransformT1(long struct, VkSRTDataNV value) Unsafe version of | |
| set | back to summary |
|---|---|
| public VkAccelerationStructureSRTMotionInstanceNV set(VkSRTDataNV transformT0, VkSRTDataNV transformT1, int instanceCustomIndex, int mask, int instanceShaderBindingTableRecordOffset, int flags, long accelerationStructureReference) Initializes this struct with the specified values. | |
| set | back to summary |
|---|---|
| public VkAccelerationStructureSRTMotionInstanceNV set(VkAccelerationStructureSRTMotionInstanceNV src) Copies the specified struct data to this struct.
| |
| sizeof | back to summary |
|---|---|
| public int sizeof() Implements abstract org. Doc from org. Returns
| |
| transformT0 | back to summary |
|---|---|
| public VkSRTDataNV transformT0() a | |
| transformT0 | back to summary |
|---|---|
| public VkAccelerationStructureSRTMotionInstanceNV transformT0(VkSRTDataNV value) Copies the specified | |
| transformT0 | back to summary |
|---|---|
| public VkAccelerationStructureSRTMotionInstanceNV transformT0(Consumer<VkSRTDataNV> consumer) Passes the | |
| transformT1 | back to summary |
|---|---|
| public VkSRTDataNV transformT1() a | |
| transformT1 | back to summary |
|---|---|
| public VkAccelerationStructureSRTMotionInstanceNV transformT1(VkSRTDataNV value) Copies the specified | |
| transformT1 | back to summary |
|---|---|
| public VkAccelerationStructureSRTMotionInstanceNV transformT1(Consumer<VkSRTDataNV> consumer) Passes the | |
VkAccelerationStructureSRTMotionInstanceNV structs.
| Modifier and Type | Field and Description |
|---|---|
| private static final VkAccelerationStructureSRTMotionInstanceNV |
| Access | Constructor and Description |
|---|---|
| public | Buffer(ByteBuffer container)
Creates a new |
| public | |
| pack-priv |
| ELEMENT_FACTORY | back to summary |
|---|---|
| private static final VkAccelerationStructureSRTMotionInstanceNV ELEMENT_FACTORY | |
| Buffer | back to summary |
|---|---|
| public Buffer(ByteBuffer container) Creates a new Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values
will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided
by The created buffer instance holds a strong reference to the container object. | |
| Buffer | back to summary |
|---|---|
| public Buffer(long address, int cap) | |
| Buffer | back to summary |
|---|---|
| pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap) | |
| accelerationStructureReference | back to summary |
|---|---|
public long accelerationStructureReference()
| |
| accelerationStructureReference | back to summary |
|---|---|
| public VkAccelerationStructureSRTMotionInstanceNV. Sets the specified value to the | |
| flags | back to summary |
|---|---|
public int flags()
| |
| flags | back to summary |
|---|---|
| public VkAccelerationStructureSRTMotionInstanceNV. Sets the specified value to the | |
| getElementFactory | back to summary |
|---|---|
| protected VkAccelerationStructureSRTMotionInstanceNV getElementFactory() Implements abstract org.
| |
| instanceCustomIndex | back to summary |
|---|---|
public int instanceCustomIndex()
| |
| instanceCustomIndex | back to summary |
|---|---|
| public VkAccelerationStructureSRTMotionInstanceNV. Sets the specified value to the | |
| instanceShaderBindingTableRecordOffset | back to summary |
|---|---|
public int instanceShaderBindingTableRecordOffset()
| |
| instanceShaderBindingTableRecordOffset | back to summary |
|---|---|
| public VkAccelerationStructureSRTMotionInstanceNV. Sets the specified value to the | |
| mask | back to summary |
|---|---|
public int mask()
| |
| mask | back to summary |
|---|---|
| public VkAccelerationStructureSRTMotionInstanceNV. Sets the specified value to the | |
| self | back to summary |
|---|---|
| protected VkAccelerationStructureSRTMotionInstanceNV. Implements abstract org.
| |
| transformT0 | back to summary |
|---|---|
public VkSRTDataNV transformT0()
| |
| transformT0 | back to summary |
|---|---|
| public VkAccelerationStructureSRTMotionInstanceNV. Copies the specified | |
| transformT0 | back to summary |
|---|---|
| public VkAccelerationStructureSRTMotionInstanceNV. Passes the | |
| transformT1 | back to summary |
|---|---|
public VkSRTDataNV transformT1()
| |
| transformT1 | back to summary |
|---|---|
| public VkAccelerationStructureSRTMotionInstanceNV. Copies the specified | |
| transformT1 | back to summary |
|---|---|
| public VkAccelerationStructureSRTMotionInstanceNV. Passes the | |