Package org.lwjgl.vulkan
Class VkGeometryTrianglesNV
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkGeometryTrianglesNV>
org.lwjgl.vulkan.VkGeometryTrianglesNV
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkGeometryTrianglesNV
extends org.lwjgl.system.Struct<VkGeometryTrianglesNV>
implements org.lwjgl.system.NativeResource
Structure specifying a triangle geometry in a bottom-level acceleration structure.
Description
If indexType is INDEX_TYPE_NONE_NV, then this structure describes a set of triangles determined by vertexCount. Otherwise, this structure describes a set of indexed triangles determined by indexCount.
Valid Usage
vertexOffsetmust be less than the size ofvertexDatavertexOffsetmust be a multiple of the component size ofvertexFormatvertexFormatmust be one ofFORMAT_R32G32B32_SFLOAT,FORMAT_R32G32_SFLOAT,FORMAT_R16G16B16_SFLOAT,FORMAT_R16G16_SFLOAT,FORMAT_R16G16_SNORM, orFORMAT_R16G16B16_SNORMvertexStridemust be less than or equal to232-1indexOffsetmust be less than the size ofindexDataindexOffsetmust be a multiple of the element size ofindexTypeindexTypemust beINDEX_TYPE_UINT16,INDEX_TYPE_UINT32, orINDEX_TYPE_NONE_NVindexDatamust beNULL_HANDLEifindexTypeisINDEX_TYPE_NONE_NVindexDatamust be a validVkBufferhandle ifindexTypeis notINDEX_TYPE_NONE_NVindexCountmust be 0 ifindexTypeisINDEX_TYPE_NONE_NVtransformOffsetmust be less than the size oftransformDatatransformOffsetmust be a multiple of 16
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_GEOMETRY_TRIANGLES_NVpNextmust beNULL- If
vertexDatais notNULL_HANDLE,vertexDatamust be a validVkBufferhandle vertexFormatmust be a validVkFormatvalue- If
indexDatais notNULL_HANDLE,indexDatamust be a validVkBufferhandle indexTypemust be a validVkIndexTypevalue- If
transformDatais notNULL_HANDLE,transformDatamust be a validVkBufferhandle - Each of
indexData,transformData, andvertexDatathat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameVkDevice
See Also
Layout
struct VkGeometryTrianglesNV {
VkStructureType sType();
void const * pNext();
VkBuffer vertexData();
VkDeviceSize vertexOffset();
uint32_t vertexCount();
VkDeviceSize vertexStride();
VkFormat vertexFormat();
VkBuffer indexData();
VkDeviceSize indexOffset();
uint32_t indexCount();
VkIndexType indexType();
VkBuffer transformData();
VkDeviceSize transformOffset();
}-
Nested Class Summary
Nested ClassesNested 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 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.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
ConstructorsConstructorDescriptionVkGeometryTrianglesNV(ByteBuffer container) Creates aVkGeometryTrianglesNVinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkGeometryTrianglesNVcalloc()Returns a newVkGeometryTrianglesNVinstance allocated withmemCalloc.static VkGeometryTrianglesNV.Buffercalloc(int capacity) Returns a newVkGeometryTrianglesNV.Bufferinstance allocated withmemCalloc.static VkGeometryTrianglesNV.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkGeometryTrianglesNV.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkGeometryTrianglesNVcalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkGeometryTrianglesNVinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkGeometryTrianglesNVDeprecated.static VkGeometryTrianglesNV.BuffercallocStack(int capacity) Deprecated.static VkGeometryTrianglesNV.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VkGeometryTrianglesNVcallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static VkGeometryTrianglesNVcreate()Returns a newVkGeometryTrianglesNVinstance allocated withBufferUtils.static VkGeometryTrianglesNV.Buffercreate(int capacity) Returns a newVkGeometryTrianglesNV.Bufferinstance allocated withBufferUtils.static VkGeometryTrianglesNVcreate(long address) Returns a newVkGeometryTrianglesNVinstance for the specified memory address.static VkGeometryTrianglesNV.Buffercreate(long address, int capacity) Create aVkGeometryTrianglesNV.Bufferinstance at the specified memory.static @Nullable VkGeometryTrianglesNVcreateSafe(long address) static @Nullable VkGeometryTrianglesNV.BuffercreateSafe(long address, int capacity) intthe number of indices to include in this geometry.indexCount(int value) Sets the specified value to theindexCount()field.longthe buffer containing index data for this geometry.indexData(long value) Sets the specified value to theindexData()field.longthe offset in bytes withinindexDatacontaining index data for this geometry.indexOffset(long value) Sets the specified value to theindexOffset()field.intaVkIndexTypedescribing the format of each index.indexType(int value) Sets the specified value to theindexType()field.static VkGeometryTrianglesNVmalloc()Returns a newVkGeometryTrianglesNVinstance allocated withmemAlloc.static VkGeometryTrianglesNV.Buffermalloc(int capacity) Returns a newVkGeometryTrianglesNV.Bufferinstance allocated withmemAlloc.static VkGeometryTrianglesNV.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkGeometryTrianglesNV.Bufferinstance allocated on the specifiedMemoryStack.static VkGeometryTrianglesNVmalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkGeometryTrianglesNVinstance allocated on the specifiedMemoryStack.static VkGeometryTrianglesNVDeprecated.static VkGeometryTrianglesNV.BuffermallocStack(int capacity) Deprecated.static VkGeometryTrianglesNV.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VkGeometryTrianglesNVmallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static intnindexCount(long struct) Unsafe version ofindexCount().static voidnindexCount(long struct, int value) Unsafe version ofindexCount.static longnindexData(long struct) Unsafe version ofindexData().static voidnindexData(long struct, long value) Unsafe version ofindexData.static longnindexOffset(long struct) Unsafe version ofindexOffset().static voidnindexOffset(long struct, long value) Unsafe version ofindexOffset.static intnindexType(long struct) Unsafe version ofindexType().static voidnindexType(long struct, int value) Unsafe version ofindexType.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.static longntransformData(long struct) Unsafe version oftransformData().static voidntransformData(long struct, long value) Unsafe version oftransformData.static longntransformOffset(long struct) Unsafe version oftransformOffset().static voidntransformOffset(long struct, long value) Unsafe version oftransformOffset.static intnvertexCount(long struct) Unsafe version ofvertexCount().static voidnvertexCount(long struct, int value) Unsafe version ofvertexCount.static longnvertexData(long struct) Unsafe version ofvertexData().static voidnvertexData(long struct, long value) Unsafe version ofvertexData.static intnvertexFormat(long struct) Unsafe version ofvertexFormat().static voidnvertexFormat(long struct, int value) Unsafe version ofvertexFormat.static longnvertexOffset(long struct) Unsafe version ofvertexOffset().static voidnvertexOffset(long struct, long value) Unsafe version ofvertexOffset.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.set(int sType, long pNext, long vertexData, long vertexOffset, int vertexCount, long vertexStride, int vertexFormat, long indexData, long indexOffset, int indexCount, int indexType, long transformData, long transformOffset) Initializes this struct with the specified values.set(VkGeometryTrianglesNV src) 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_GEOMETRY_TRIANGLES_NVvalue to thesType()field.longan optional buffer containing anVkTransformMatrixNVstructure defining a transformation to be applied to this geometry.transformData(long value) Sets the specified value to thetransformData()field.longthe offset in bytes intransformDataof the transform information described above.transformOffset(long value) Sets the specified value to thetransformOffset()field.intthe number of valid vertices.vertexCount(int value) Sets the specified value to thevertexCount()field.longthe buffer containing vertex data for this geometry.vertexData(long value) Sets the specified value to thevertexData()field.intaVkFormatdescribing the format of each vertex element.vertexFormat(int value) Sets the specified value to thevertexFormat()field.longthe offset in bytes withinvertexDatacontaining vertex data for this geometry.vertexOffset(long value) Sets the specified value to thevertexOffset()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. -
VERTEXDATA
public static final int VERTEXDATAThe struct member offsets. -
VERTEXOFFSET
public static final int VERTEXOFFSETThe struct member offsets. -
VERTEXCOUNT
public static final int VERTEXCOUNTThe struct member offsets. -
VERTEXSTRIDE
public static final int VERTEXSTRIDEThe struct member offsets. -
VERTEXFORMAT
public static final int VERTEXFORMATThe struct member offsets. -
INDEXDATA
public static final int INDEXDATAThe struct member offsets. -
INDEXOFFSET
public static final int INDEXOFFSETThe struct member offsets. -
INDEXCOUNT
public static final int INDEXCOUNTThe struct member offsets. -
INDEXTYPE
public static final int INDEXTYPEThe struct member offsets. -
TRANSFORMDATA
public static final int TRANSFORMDATAThe struct member offsets. -
TRANSFORMOFFSET
public static final int TRANSFORMOFFSETThe struct member offsets.
-
-
Constructor Details
-
VkGeometryTrianglesNV
Creates aVkGeometryTrianglesNVinstance 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<VkGeometryTrianglesNV>
-
sType
public int sType()aVkStructureTypevalue identifying this structure. -
pNext
public long pNext()NULLor a pointer to a structure extending this structure. -
vertexData
public long vertexData()the buffer containing vertex data for this geometry. -
vertexOffset
public long vertexOffset()the offset in bytes withinvertexDatacontaining vertex data for this geometry. -
vertexCount
public int vertexCount()the number of valid vertices. -
vertexStride
public long vertexStride()the stride in bytes between each vertex. -
vertexFormat
public int vertexFormat()aVkFormatdescribing the format of each vertex element. -
indexData
public long indexData()the buffer containing index data for this geometry. -
indexOffset
public long indexOffset()the offset in bytes withinindexDatacontaining index data for this geometry. -
indexCount
public int indexCount()the number of indices to include in this geometry. -
indexType
public int indexType()aVkIndexTypedescribing the format of each index. -
transformData
public long transformData()an optional buffer containing anVkTransformMatrixNVstructure defining a transformation to be applied to this geometry. -
transformOffset
public long transformOffset()the offset in bytes intransformDataof the transform information described above. -
sType
Sets the specified value to thesType()field. -
sType$Default
Sets theSTRUCTURE_TYPE_GEOMETRY_TRIANGLES_NVvalue to thesType()field. -
pNext
Sets the specified value to thepNext()field. -
vertexData
Sets the specified value to thevertexData()field. -
vertexOffset
Sets the specified value to thevertexOffset()field. -
vertexCount
Sets the specified value to thevertexCount()field. -
vertexStride
Sets the specified value to thevertexStride()field. -
vertexFormat
Sets the specified value to thevertexFormat()field. -
indexData
Sets the specified value to theindexData()field. -
indexOffset
Sets the specified value to theindexOffset()field. -
indexCount
Sets the specified value to theindexCount()field. -
indexType
Sets the specified value to theindexType()field. -
transformData
Sets the specified value to thetransformData()field. -
transformOffset
Sets the specified value to thetransformOffset()field. -
set
public VkGeometryTrianglesNV set(int sType, long pNext, long vertexData, long vertexOffset, int vertexCount, long vertexStride, int vertexFormat, long indexData, long indexOffset, int indexCount, int indexType, long transformData, long transformOffset) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newVkGeometryTrianglesNVinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkGeometryTrianglesNVinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkGeometryTrianglesNVinstance allocated withBufferUtils. -
create
Returns a newVkGeometryTrianglesNVinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkGeometryTrianglesNV.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkGeometryTrianglesNV.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkGeometryTrianglesNV.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkGeometryTrianglesNV.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
mallocStack
@Deprecated public static VkGeometryTrianglesNV.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
@Deprecated public static VkGeometryTrianglesNV.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newVkGeometryTrianglesNVinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVkGeometryTrianglesNVinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newVkGeometryTrianglesNV.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newVkGeometryTrianglesNV.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(). -
nvertexData
public static long nvertexData(long struct) Unsafe version ofvertexData(). -
nvertexOffset
public static long nvertexOffset(long struct) Unsafe version ofvertexOffset(). -
nvertexCount
public static int nvertexCount(long struct) Unsafe version ofvertexCount(). -
nvertexStride
public static long nvertexStride(long struct) Unsafe version ofvertexStride(). -
nvertexFormat
public static int nvertexFormat(long struct) Unsafe version ofvertexFormat(). -
nindexData
public static long nindexData(long struct) Unsafe version ofindexData(). -
nindexOffset
public static long nindexOffset(long struct) Unsafe version ofindexOffset(). -
nindexCount
public static int nindexCount(long struct) Unsafe version ofindexCount(). -
nindexType
public static int nindexType(long struct) Unsafe version ofindexType(). -
ntransformData
public static long ntransformData(long struct) Unsafe version oftransformData(). -
ntransformOffset
public static long ntransformOffset(long struct) Unsafe version oftransformOffset(). -
nsType
public static void nsType(long struct, int value) Unsafe version ofsType. -
npNext
public static void npNext(long struct, long value) Unsafe version ofpNext. -
nvertexData
public static void nvertexData(long struct, long value) Unsafe version ofvertexData. -
nvertexOffset
public static void nvertexOffset(long struct, long value) Unsafe version ofvertexOffset. -
nvertexCount
public static void nvertexCount(long struct, int value) Unsafe version ofvertexCount. -
nvertexStride
public static void nvertexStride(long struct, long value) Unsafe version ofvertexStride. -
nvertexFormat
public static void nvertexFormat(long struct, int value) Unsafe version ofvertexFormat. -
nindexData
public static void nindexData(long struct, long value) Unsafe version ofindexData. -
nindexOffset
public static void nindexOffset(long struct, long value) Unsafe version ofindexOffset. -
nindexCount
public static void nindexCount(long struct, int value) Unsafe version ofindexCount. -
nindexType
public static void nindexType(long struct, int value) Unsafe version ofindexType. -
ntransformData
public static void ntransformData(long struct, long value) Unsafe version oftransformData. -
ntransformOffset
public static void ntransformOffset(long struct, long value) Unsafe version oftransformOffset.
-