Package org.lwjgl.vulkan
Class VkGeometryTrianglesNV
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkGeometryTrianglesNV
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkGeometryTrianglesNV extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying a triangle geometry in a bottom-level acceleration structure.Description
If
indexTypeisINDEX_TYPE_NONE_NV, then this structure describes a set of triangles determined byvertexCount. Otherwise, this structure describes a set of indexed triangles determined byindexCount.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_SNORMindexOffsetmust 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 must have been created, allocated, or retrieved from the sameVkDevice
See Also
Member documentation
sType– the type of this structure.pNext–NULLor a pointer to an extension-specific structure.vertexData– the buffer containing vertex data for this geometry.vertexOffset– the offset in bytes withinvertexDatacontaining vertex data for this geometry.vertexCount– the number of valid vertices.vertexStride– the stride in bytes between each vertex.vertexFormat– the format of each vertex element.indexData– the buffer containing index data for this geometry.indexOffset– the offset in bytes withinindexDatacontaining index data for this geometry.indexCount– the number of indices to include in this geometry.indexType– the format of each index.transformData– a buffer containing optional reference to an array of 32-bit floats representing a 3x4 row major affine transformation matrix for this geometry.transformOffset– the offset in bytes intransformDataof the transform information described above.
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 Classes Modifier and Type Class Description static classVkGeometryTrianglesNV.BufferAn array ofVkGeometryTrianglesNVstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intINDEXCOUNT
INDEXDATA
INDEXOFFSET
INDEXTYPE
PNEXTThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTYPE
TRANSFORMDATA
TRANSFORMOFFSET
VERTEXCOUNT
VERTEXDATA
VERTEXFORMAT
VERTEXOFFSET
VERTEXSTRIDEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkGeometryTrianglesNV(java.nio.ByteBuffer container)Creates aVkGeometryTrianglesNVinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkGeometryTrianglesNVcalloc()Returns a newVkGeometryTrianglesNVinstance allocated withmemCalloc.static VkGeometryTrianglesNV.Buffercalloc(int capacity)Returns a newVkGeometryTrianglesNV.Bufferinstance allocated withmemCalloc.static VkGeometryTrianglesNVcallocStack()Returns a newVkGeometryTrianglesNVinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkGeometryTrianglesNV.BuffercallocStack(int capacity)Returns a newVkGeometryTrianglesNV.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkGeometryTrianglesNV.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkGeometryTrianglesNV.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkGeometryTrianglesNVcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkGeometryTrianglesNVinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.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 VkGeometryTrianglesNVcreateSafe(long address)static VkGeometryTrianglesNV.BuffercreateSafe(long address, int capacity)intindexCount()Returns the value of theindexCountfield.VkGeometryTrianglesNVindexCount(int value)Sets the specified value to theindexCountfield.longindexData()Returns the value of theindexDatafield.VkGeometryTrianglesNVindexData(long value)Sets the specified value to theindexDatafield.longindexOffset()Returns the value of theindexOffsetfield.VkGeometryTrianglesNVindexOffset(long value)Sets the specified value to theindexOffsetfield.intindexType()Returns the value of theindexTypefield.VkGeometryTrianglesNVindexType(int value)Sets the specified value to theindexTypefield.static VkGeometryTrianglesNVmalloc()Returns a newVkGeometryTrianglesNVinstance allocated withmemAlloc.static VkGeometryTrianglesNV.Buffermalloc(int capacity)Returns a newVkGeometryTrianglesNV.Bufferinstance allocated withmemAlloc.static VkGeometryTrianglesNVmallocStack()Returns a newVkGeometryTrianglesNVinstance allocated on the thread-localMemoryStack.static VkGeometryTrianglesNV.BuffermallocStack(int capacity)Returns a newVkGeometryTrianglesNV.Bufferinstance allocated on the thread-localMemoryStack.static VkGeometryTrianglesNV.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkGeometryTrianglesNV.Bufferinstance allocated on the specifiedMemoryStack.static VkGeometryTrianglesNVmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkGeometryTrianglesNVinstance allocated on the specifiedMemoryStack.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()Returns the value of thepNextfield.VkGeometryTrianglesNVpNext(long value)Sets the specified value to thepNextfield.VkGeometryTrianglesNVset(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.VkGeometryTrianglesNVset(VkGeometryTrianglesNV src)Copies the specified struct data to this struct.intsizeof()intsType()Returns the value of thesTypefield.VkGeometryTrianglesNVsType(int value)Sets the specified value to thesTypefield.longtransformData()Returns the value of thetransformDatafield.VkGeometryTrianglesNVtransformData(long value)Sets the specified value to thetransformDatafield.longtransformOffset()Returns the value of thetransformOffsetfield.VkGeometryTrianglesNVtransformOffset(long value)Sets the specified value to thetransformOffsetfield.intvertexCount()Returns the value of thevertexCountfield.VkGeometryTrianglesNVvertexCount(int value)Sets the specified value to thevertexCountfield.longvertexData()Returns the value of thevertexDatafield.VkGeometryTrianglesNVvertexData(long value)Sets the specified value to thevertexDatafield.intvertexFormat()Returns the value of thevertexFormatfield.VkGeometryTrianglesNVvertexFormat(int value)Sets the specified value to thevertexFormatfield.longvertexOffset()Returns the value of thevertexOffsetfield.VkGeometryTrianglesNVvertexOffset(long value)Sets the specified value to thevertexOffsetfield.longvertexStride()Returns the value of thevertexStridefield.VkGeometryTrianglesNVvertexStride(long value)Sets the specified value to thevertexStridefield.
-
-
-
Constructor Detail
-
VkGeometryTrianglesNV
public VkGeometryTrianglesNV(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
sType
public int sType()
Returns the value of thesTypefield.
-
pNext
public long pNext()
Returns the value of thepNextfield.
-
vertexData
public long vertexData()
Returns the value of thevertexDatafield.
-
vertexOffset
public long vertexOffset()
Returns the value of thevertexOffsetfield.
-
vertexCount
public int vertexCount()
Returns the value of thevertexCountfield.
-
vertexStride
public long vertexStride()
Returns the value of thevertexStridefield.
-
vertexFormat
public int vertexFormat()
Returns the value of thevertexFormatfield.
-
indexData
public long indexData()
Returns the value of theindexDatafield.
-
indexOffset
public long indexOffset()
Returns the value of theindexOffsetfield.
-
indexCount
public int indexCount()
Returns the value of theindexCountfield.
-
indexType
public int indexType()
Returns the value of theindexTypefield.
-
transformData
public long transformData()
Returns the value of thetransformDatafield.
-
transformOffset
public long transformOffset()
Returns the value of thetransformOffsetfield.
-
sType
public VkGeometryTrianglesNV sType(int value)
Sets the specified value to thesTypefield.
-
pNext
public VkGeometryTrianglesNV pNext(long value)
Sets the specified value to thepNextfield.
-
vertexData
public VkGeometryTrianglesNV vertexData(long value)
Sets the specified value to thevertexDatafield.
-
vertexOffset
public VkGeometryTrianglesNV vertexOffset(long value)
Sets the specified value to thevertexOffsetfield.
-
vertexCount
public VkGeometryTrianglesNV vertexCount(int value)
Sets the specified value to thevertexCountfield.
-
vertexStride
public VkGeometryTrianglesNV vertexStride(long value)
Sets the specified value to thevertexStridefield.
-
vertexFormat
public VkGeometryTrianglesNV vertexFormat(int value)
Sets the specified value to thevertexFormatfield.
-
indexData
public VkGeometryTrianglesNV indexData(long value)
Sets the specified value to theindexDatafield.
-
indexOffset
public VkGeometryTrianglesNV indexOffset(long value)
Sets the specified value to theindexOffsetfield.
-
indexCount
public VkGeometryTrianglesNV indexCount(int value)
Sets the specified value to theindexCountfield.
-
indexType
public VkGeometryTrianglesNV indexType(int value)
Sets the specified value to theindexTypefield.
-
transformData
public VkGeometryTrianglesNV transformData(long value)
Sets the specified value to thetransformDatafield.
-
transformOffset
public VkGeometryTrianglesNV transformOffset(long value)
Sets the specified value to thetransformOffsetfield.
-
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
public VkGeometryTrianglesNV set(VkGeometryTrianglesNV src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkGeometryTrianglesNV malloc()
Returns a newVkGeometryTrianglesNVinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkGeometryTrianglesNV calloc()
Returns a newVkGeometryTrianglesNVinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkGeometryTrianglesNV create()
Returns a newVkGeometryTrianglesNVinstance allocated withBufferUtils.
-
create
public static VkGeometryTrianglesNV create(long address)
Returns a newVkGeometryTrianglesNVinstance for the specified memory address.
-
createSafe
@Nullable public static VkGeometryTrianglesNV createSafe(long address)
-
malloc
public static VkGeometryTrianglesNV.Buffer malloc(int capacity)
Returns a newVkGeometryTrianglesNV.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkGeometryTrianglesNV.Buffer calloc(int capacity)
Returns a newVkGeometryTrianglesNV.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkGeometryTrianglesNV.Buffer create(int capacity)
Returns a newVkGeometryTrianglesNV.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkGeometryTrianglesNV.Buffer create(long address, int capacity)
Create aVkGeometryTrianglesNV.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkGeometryTrianglesNV.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkGeometryTrianglesNV mallocStack()
Returns a newVkGeometryTrianglesNVinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkGeometryTrianglesNV callocStack()
Returns a newVkGeometryTrianglesNVinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkGeometryTrianglesNV mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkGeometryTrianglesNVinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkGeometryTrianglesNV callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkGeometryTrianglesNVinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static VkGeometryTrianglesNV.Buffer mallocStack(int capacity)
Returns a newVkGeometryTrianglesNV.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkGeometryTrianglesNV.Buffer callocStack(int capacity)
Returns a newVkGeometryTrianglesNV.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkGeometryTrianglesNV.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkGeometryTrianglesNV.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static VkGeometryTrianglesNV.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkGeometryTrianglesNV.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
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.
-
-