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 matrix motion instance at a point in time is derived by component-wise linear interpolation of the two 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, VkTransformMatrixKHR
struct VkAccelerationStructureMatrixMotionInstanceNV {
VkTransformMatrixKHR transformT0;
VkTransformMatrixKHR 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 | VkAccelerationStructureMatrixMotionInstanceNV(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public long | accelerationStructureReference()
either:
|
| public VkAccelerationStructureMatrixMotionInstanceNV | accelerationStructureReference(long value)
Sets the specified value to the |
| public static VkAccelerationStructureMatrixMotionInstanceNV | |
| public static VkAccelerationStructureMatrixMotionInstanceNV. | calloc(int
the buffer capacity capacity)Returns a new |
| public static VkAccelerationStructureMatrixMotionInstanceNV | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkAccelerationStructureMatrixMotionInstanceNV. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| protected VkAccelerationStructureMatrixMotionInstanceNV | 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 VkAccelerationStructureMatrixMotionInstanceNV | create()
Returns a new |
| public static VkAccelerationStructureMatrixMotionInstanceNV | create(long address)
Returns a new |
| public static VkAccelerationStructureMatrixMotionInstanceNV. | create(int
the buffer capacity capacity)Returns a new |
| public static VkAccelerationStructureMatrixMotionInstanceNV. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static VkAccelerationStructureMatrixMotionInstanceNV | |
| public static VkAccelerationStructureMatrixMotionInstanceNV. | |
| public int | |
| public VkAccelerationStructureMatrixMotionInstanceNV | |
| public int | instanceCustomIndex()
a 24-bit user-specified index value accessible to ray shaders in the |
| public VkAccelerationStructureMatrixMotionInstanceNV | |
| public int | instanceShaderBindingTableRecordOffset()
a 24-bit offset used in calculating the hit shader binding table index. |
| public VkAccelerationStructureMatrixMotionInstanceNV | instanceShaderBindingTableRecordOffset(int value)
Sets the specified value to the |
| public static VkAccelerationStructureMatrixMotionInstanceNV | |
| public static VkAccelerationStructureMatrixMotionInstanceNV. | malloc(int
the buffer capacity capacity)Returns a new |
| public static VkAccelerationStructureMatrixMotionInstanceNV | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkAccelerationStructureMatrixMotionInstanceNV. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public int | |
| public VkAccelerationStructureMatrixMotionInstanceNV | |
| 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 VkTransformMatrixKHR | |
| public static void | |
| public static VkTransformMatrixKHR | |
| public static void | |
| public VkAccelerationStructureMatrixMotionInstanceNV | set(VkTransformMatrixKHR transformT0, VkTransformMatrixKHR transformT1, int instanceCustomIndex, int mask, int instanceShaderBindingTableRecordOffset, int flags, long accelerationStructureReference)
Initializes this struct with the specified values. |
| public VkAccelerationStructureMatrixMotionInstanceNV | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public int | |
| public VkTransformMatrixKHR | transformT0()
a |
| public VkAccelerationStructureMatrixMotionInstanceNV | transformT0(VkTransformMatrixKHR value)
Copies the specified |
| public VkAccelerationStructureMatrixMotionInstanceNV | transformT0(Consumer<VkTransformMatrixKHR> consumer)
Passes the |
| public VkTransformMatrixKHR | transformT1()
a |
| public VkAccelerationStructureMatrixMotionInstanceNV | transformT1(VkTransformMatrixKHR value)
Copies the specified |
| public VkAccelerationStructureMatrixMotionInstanceNV | transformT1(Consumer<VkTransformMatrixKHR> consumer)
Passes the |
| 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. | |
| VkAccelerationStructureMatrixMotionInstanceNV | back to summary |
|---|---|
| protected VkAccelerationStructureMatrixMotionInstanceNV(long address, ByteBuffer container) | |
| VkAccelerationStructureMatrixMotionInstanceNV | back to summary |
|---|---|
| public VkAccelerationStructureMatrixMotionInstanceNV(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 VkAccelerationStructureMatrixMotionInstanceNV accelerationStructureReference(long value) Sets the specified value to the | |
| calloc | back to summary |
|---|---|
| public static VkAccelerationStructureMatrixMotionInstanceNV calloc() Returns a new | |
| calloc | back to summary |
|---|---|
| public static VkAccelerationStructureMatrixMotionInstanceNV. Returns a new
| |
| calloc | back to summary |
|---|---|
| public static VkAccelerationStructureMatrixMotionInstanceNV calloc(MemoryStack stack) Returns a new
| |
| calloc | back to summary |
|---|---|
| public static VkAccelerationStructureMatrixMotionInstanceNV. Returns a new
| |
| create | back to summary |
|---|---|
| protected VkAccelerationStructureMatrixMotionInstanceNV create(long address, ByteBuffer container) Implements abstract org. Doc from org. Similar to Effectively, every
| |
| create | back to summary |
|---|---|
| public static VkAccelerationStructureMatrixMotionInstanceNV create() Returns a new | |
| create | back to summary |
|---|---|
| public static VkAccelerationStructureMatrixMotionInstanceNV create(long address) Returns a new | |
| create | back to summary |
|---|---|
| public static VkAccelerationStructureMatrixMotionInstanceNV. Returns a new
| |
| create | back to summary |
|---|---|
| public static VkAccelerationStructureMatrixMotionInstanceNV. Create a
| |
| createSafe | back to summary |
|---|---|
| public static VkAccelerationStructureMatrixMotionInstanceNV createSafe(long address) Like
| |
| createSafe | back to summary |
|---|---|
| public static VkAccelerationStructureMatrixMotionInstanceNV. Like
| |
| flags | back to summary |
|---|---|
| public int flags() an 8-bit mask of
| |
| flags | back to summary |
|---|---|
| public VkAccelerationStructureMatrixMotionInstanceNV 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 VkAccelerationStructureMatrixMotionInstanceNV 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 VkAccelerationStructureMatrixMotionInstanceNV instanceShaderBindingTableRecordOffset(int value) Sets the specified value to the | |
| malloc | back to summary |
|---|---|
| public static VkAccelerationStructureMatrixMotionInstanceNV malloc() Returns a new | |
| malloc | back to summary |
|---|---|
| public static VkAccelerationStructureMatrixMotionInstanceNV. Returns a new
| |
| malloc | back to summary |
|---|---|
| public static VkAccelerationStructureMatrixMotionInstanceNV malloc(MemoryStack stack) Returns a new
| |
| malloc | back to summary |
|---|---|
| public static VkAccelerationStructureMatrixMotionInstanceNV. 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 VkAccelerationStructureMatrixMotionInstanceNV 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 VkTransformMatrixKHR ntransformT0(long struct) Unsafe version of | |
| ntransformT0 | back to summary |
|---|---|
| public static void ntransformT0(long struct, VkTransformMatrixKHR value) Unsafe version of | |
| ntransformT1 | back to summary |
|---|---|
| public static VkTransformMatrixKHR ntransformT1(long struct) Unsafe version of | |
| ntransformT1 | back to summary |
|---|---|
| public static void ntransformT1(long struct, VkTransformMatrixKHR value) Unsafe version of | |
| set | back to summary |
|---|---|
| public VkAccelerationStructureMatrixMotionInstanceNV set(VkTransformMatrixKHR transformT0, VkTransformMatrixKHR transformT1, int instanceCustomIndex, int mask, int instanceShaderBindingTableRecordOffset, int flags, long accelerationStructureReference) Initializes this struct with the specified values. | |
| set | back to summary |
|---|---|
| public VkAccelerationStructureMatrixMotionInstanceNV set(VkAccelerationStructureMatrixMotionInstanceNV 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 VkTransformMatrixKHR transformT0() a | |
| transformT0 | back to summary |
|---|---|
| public VkAccelerationStructureMatrixMotionInstanceNV transformT0(VkTransformMatrixKHR value) Copies the specified | |
| transformT0 | back to summary |
|---|---|
| public VkAccelerationStructureMatrixMotionInstanceNV transformT0(Consumer<VkTransformMatrixKHR> consumer) Passes the | |
| transformT1 | back to summary |
|---|---|
| public VkTransformMatrixKHR transformT1() a | |
| transformT1 | back to summary |
|---|---|
| public VkAccelerationStructureMatrixMotionInstanceNV transformT1(VkTransformMatrixKHR value) Copies the specified | |
| transformT1 | back to summary |
|---|---|
| public VkAccelerationStructureMatrixMotionInstanceNV transformT1(Consumer<VkTransformMatrixKHR> consumer) Passes the | |
VkAccelerationStructureMatrixMotionInstanceNV structs.
| Modifier and Type | Field and Description |
|---|---|
| private static final VkAccelerationStructureMatrixMotionInstanceNV |
| Access | Constructor and Description |
|---|---|
| public | Buffer(ByteBuffer container)
Creates a new |
| public | |
| pack-priv |
| ELEMENT_FACTORY | back to summary |
|---|---|
| private static final VkAccelerationStructureMatrixMotionInstanceNV 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 VkAccelerationStructureMatrixMotionInstanceNV. Sets the specified value to the | |
| flags | back to summary |
|---|---|
public int flags()
| |
| flags | back to summary |
|---|---|
| public VkAccelerationStructureMatrixMotionInstanceNV. Sets the specified value to the | |
| getElementFactory | back to summary |
|---|---|
| protected VkAccelerationStructureMatrixMotionInstanceNV getElementFactory() Implements abstract org.
| |
| instanceCustomIndex | back to summary |
|---|---|
public int instanceCustomIndex()
| |
| instanceCustomIndex | back to summary |
|---|---|
| public VkAccelerationStructureMatrixMotionInstanceNV. Sets the specified value to the | |
| instanceShaderBindingTableRecordOffset | back to summary |
|---|---|
public int instanceShaderBindingTableRecordOffset()
| |
| instanceShaderBindingTableRecordOffset | back to summary |
|---|---|
| public VkAccelerationStructureMatrixMotionInstanceNV. Sets the specified value to the | |
| mask | back to summary |
|---|---|
public int mask()
| |
| mask | back to summary |
|---|---|
| public VkAccelerationStructureMatrixMotionInstanceNV. Sets the specified value to the | |
| self | back to summary |
|---|---|
| protected VkAccelerationStructureMatrixMotionInstanceNV. Implements abstract org.
| |
| transformT0 | back to summary |
|---|---|
public VkTransformMatrixKHR transformT0()
| |
| transformT0 | back to summary |
|---|---|
| public VkAccelerationStructureMatrixMotionInstanceNV. Copies the specified | |
| transformT0 | back to summary |
|---|---|
| public VkAccelerationStructureMatrixMotionInstanceNV. Passes the | |
| transformT1 | back to summary |
|---|---|
public VkTransformMatrixKHR transformT1()
| |
| transformT1 | back to summary |
|---|---|
| public VkAccelerationStructureMatrixMotionInstanceNV. Copies the specified | |
| transformT1 | back to summary |
|---|---|
| public VkAccelerationStructureMatrixMotionInstanceNV. Passes the | |