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.NativeResource
Structure specifying a triangle geometry in a bottom-level acceleration structure.Description
If
indexType
isINDEX_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
vertexOffset
must be less than the size ofvertexData
vertexOffset
must be a multiple of the component size ofvertexFormat
vertexFormat
must be one ofFORMAT_R32G32B32_SFLOAT
,FORMAT_R32G32_SFLOAT
,FORMAT_R16G16B16_SFLOAT
,FORMAT_R16G16_SFLOAT
,FORMAT_R16G16_SNORM
, orFORMAT_R16G16B16_SNORM
indexOffset
must be less than the size ofindexData
indexOffset
must be a multiple of the element size ofindexType
indexType
must beINDEX_TYPE_UINT16
,INDEX_TYPE_UINT32
, orINDEX_TYPE_NONE_NV
indexData
must beNULL_HANDLE
ifindexType
isINDEX_TYPE_NONE_NV
indexData
must be a validVkBuffer
handle ifindexType
is notINDEX_TYPE_NONE_NV
indexCount
must be 0 ifindexType
isINDEX_TYPE_NONE_NV
transformOffset
must be less than the size oftransformData
transformOffset
must be a multiple of 16
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV
pNext
must beNULL
- If
vertexData
is notNULL_HANDLE
,vertexData
must be a validVkBuffer
handle vertexFormat
must be a validVkFormat
value- If
indexData
is notNULL_HANDLE
,indexData
must be a validVkBuffer
handle indexType
must be a validVkIndexType
value- If
transformData
is notNULL_HANDLE
,transformData
must be a validVkBuffer
handle - Each of
indexData
,transformData
, andvertexData
that are valid handles must have been created, allocated, or retrieved from the sameVkDevice
See Also
Member documentation
sType
– the type of this structure.pNext
–NULL
or a pointer to an extension-specific structure.vertexData
– the buffer containing vertex data for this geometry.vertexOffset
– the offset in bytes withinvertexData
containing 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 withinindexData
containing 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 intransformData
of 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 class
VkGeometryTrianglesNV.Buffer
An array ofVkGeometryTrianglesNV
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
INDEXCOUNT
INDEXDATA
INDEXOFFSET
INDEXTYPE
PNEXTThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
STYPE
TRANSFORMDATA
TRANSFORMOFFSET
VERTEXCOUNT
VERTEXDATA
VERTEXFORMAT
VERTEXOFFSET
VERTEXSTRIDEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkGeometryTrianglesNV(java.nio.ByteBuffer container)
Creates aVkGeometryTrianglesNV
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkGeometryTrianglesNV
calloc()
Returns a newVkGeometryTrianglesNV
instance allocated withmemCalloc
.static VkGeometryTrianglesNV.Buffer
calloc(int capacity)
Returns a newVkGeometryTrianglesNV.Buffer
instance allocated withmemCalloc
.static VkGeometryTrianglesNV
callocStack()
Returns a newVkGeometryTrianglesNV
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkGeometryTrianglesNV.Buffer
callocStack(int capacity)
Returns a newVkGeometryTrianglesNV.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkGeometryTrianglesNV.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkGeometryTrianglesNV.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkGeometryTrianglesNV
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkGeometryTrianglesNV
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkGeometryTrianglesNV
create()
Returns a newVkGeometryTrianglesNV
instance allocated withBufferUtils
.static VkGeometryTrianglesNV.Buffer
create(int capacity)
Returns a newVkGeometryTrianglesNV.Buffer
instance allocated withBufferUtils
.static VkGeometryTrianglesNV
create(long address)
Returns a newVkGeometryTrianglesNV
instance for the specified memory address.static VkGeometryTrianglesNV.Buffer
create(long address, int capacity)
Create aVkGeometryTrianglesNV.Buffer
instance at the specified memory.static VkGeometryTrianglesNV
createSafe(long address)
static VkGeometryTrianglesNV.Buffer
createSafe(long address, int capacity)
int
indexCount()
Returns the value of theindexCount
field.VkGeometryTrianglesNV
indexCount(int value)
Sets the specified value to theindexCount
field.long
indexData()
Returns the value of theindexData
field.VkGeometryTrianglesNV
indexData(long value)
Sets the specified value to theindexData
field.long
indexOffset()
Returns the value of theindexOffset
field.VkGeometryTrianglesNV
indexOffset(long value)
Sets the specified value to theindexOffset
field.int
indexType()
Returns the value of theindexType
field.VkGeometryTrianglesNV
indexType(int value)
Sets the specified value to theindexType
field.static VkGeometryTrianglesNV
malloc()
Returns a newVkGeometryTrianglesNV
instance allocated withmemAlloc
.static VkGeometryTrianglesNV.Buffer
malloc(int capacity)
Returns a newVkGeometryTrianglesNV.Buffer
instance allocated withmemAlloc
.static VkGeometryTrianglesNV
mallocStack()
Returns a newVkGeometryTrianglesNV
instance allocated on the thread-localMemoryStack
.static VkGeometryTrianglesNV.Buffer
mallocStack(int capacity)
Returns a newVkGeometryTrianglesNV.Buffer
instance allocated on the thread-localMemoryStack
.static VkGeometryTrianglesNV.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkGeometryTrianglesNV.Buffer
instance allocated on the specifiedMemoryStack
.static VkGeometryTrianglesNV
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkGeometryTrianglesNV
instance allocated on the specifiedMemoryStack
.static int
nindexCount(long struct)
Unsafe version ofindexCount()
.static void
nindexCount(long struct, int value)
Unsafe version ofindexCount
.static long
nindexData(long struct)
Unsafe version ofindexData()
.static void
nindexData(long struct, long value)
Unsafe version ofindexData
.static long
nindexOffset(long struct)
Unsafe version ofindexOffset()
.static void
nindexOffset(long struct, long value)
Unsafe version ofindexOffset
.static int
nindexType(long struct)
Unsafe version ofindexType()
.static void
nindexType(long struct, int value)
Unsafe version ofindexType
.static long
npNext(long struct)
Unsafe version ofpNext()
.static void
npNext(long struct, long value)
Unsafe version ofpNext
.static int
nsType(long struct)
Unsafe version ofsType()
.static void
nsType(long struct, int value)
Unsafe version ofsType
.static long
ntransformData(long struct)
Unsafe version oftransformData()
.static void
ntransformData(long struct, long value)
Unsafe version oftransformData
.static long
ntransformOffset(long struct)
Unsafe version oftransformOffset()
.static void
ntransformOffset(long struct, long value)
Unsafe version oftransformOffset
.static int
nvertexCount(long struct)
Unsafe version ofvertexCount()
.static void
nvertexCount(long struct, int value)
Unsafe version ofvertexCount
.static long
nvertexData(long struct)
Unsafe version ofvertexData()
.static void
nvertexData(long struct, long value)
Unsafe version ofvertexData
.static int
nvertexFormat(long struct)
Unsafe version ofvertexFormat()
.static void
nvertexFormat(long struct, int value)
Unsafe version ofvertexFormat
.static long
nvertexOffset(long struct)
Unsafe version ofvertexOffset()
.static void
nvertexOffset(long struct, long value)
Unsafe version ofvertexOffset
.static long
nvertexStride(long struct)
Unsafe version ofvertexStride()
.static void
nvertexStride(long struct, long value)
Unsafe version ofvertexStride
.long
pNext()
Returns the value of thepNext
field.VkGeometryTrianglesNV
pNext(long value)
Sets the specified value to thepNext
field.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.VkGeometryTrianglesNV
set(VkGeometryTrianglesNV src)
Copies the specified struct data to this struct.int
sizeof()
int
sType()
Returns the value of thesType
field.VkGeometryTrianglesNV
sType(int value)
Sets the specified value to thesType
field.long
transformData()
Returns the value of thetransformData
field.VkGeometryTrianglesNV
transformData(long value)
Sets the specified value to thetransformData
field.long
transformOffset()
Returns the value of thetransformOffset
field.VkGeometryTrianglesNV
transformOffset(long value)
Sets the specified value to thetransformOffset
field.int
vertexCount()
Returns the value of thevertexCount
field.VkGeometryTrianglesNV
vertexCount(int value)
Sets the specified value to thevertexCount
field.long
vertexData()
Returns the value of thevertexData
field.VkGeometryTrianglesNV
vertexData(long value)
Sets the specified value to thevertexData
field.int
vertexFormat()
Returns the value of thevertexFormat
field.VkGeometryTrianglesNV
vertexFormat(int value)
Sets the specified value to thevertexFormat
field.long
vertexOffset()
Returns the value of thevertexOffset
field.VkGeometryTrianglesNV
vertexOffset(long value)
Sets the specified value to thevertexOffset
field.long
vertexStride()
Returns the value of thevertexStride
field.VkGeometryTrianglesNV
vertexStride(long value)
Sets the specified value to thevertexStride
field.
-
-
-
Constructor Detail
-
VkGeometryTrianglesNV
public VkGeometryTrianglesNV(java.nio.ByteBuffer container)
Creates aVkGeometryTrianglesNV
instance at the current position of the specifiedByteBuffer
container. 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:
sizeof
in classorg.lwjgl.system.Struct
-
sType
public int sType()
Returns the value of thesType
field.
-
pNext
public long pNext()
Returns the value of thepNext
field.
-
vertexData
public long vertexData()
Returns the value of thevertexData
field.
-
vertexOffset
public long vertexOffset()
Returns the value of thevertexOffset
field.
-
vertexCount
public int vertexCount()
Returns the value of thevertexCount
field.
-
vertexStride
public long vertexStride()
Returns the value of thevertexStride
field.
-
vertexFormat
public int vertexFormat()
Returns the value of thevertexFormat
field.
-
indexData
public long indexData()
Returns the value of theindexData
field.
-
indexOffset
public long indexOffset()
Returns the value of theindexOffset
field.
-
indexCount
public int indexCount()
Returns the value of theindexCount
field.
-
indexType
public int indexType()
Returns the value of theindexType
field.
-
transformData
public long transformData()
Returns the value of thetransformData
field.
-
transformOffset
public long transformOffset()
Returns the value of thetransformOffset
field.
-
sType
public VkGeometryTrianglesNV sType(int value)
Sets the specified value to thesType
field.
-
pNext
public VkGeometryTrianglesNV pNext(long value)
Sets the specified value to thepNext
field.
-
vertexData
public VkGeometryTrianglesNV vertexData(long value)
Sets the specified value to thevertexData
field.
-
vertexOffset
public VkGeometryTrianglesNV vertexOffset(long value)
Sets the specified value to thevertexOffset
field.
-
vertexCount
public VkGeometryTrianglesNV vertexCount(int value)
Sets the specified value to thevertexCount
field.
-
vertexStride
public VkGeometryTrianglesNV vertexStride(long value)
Sets the specified value to thevertexStride
field.
-
vertexFormat
public VkGeometryTrianglesNV vertexFormat(int value)
Sets the specified value to thevertexFormat
field.
-
indexData
public VkGeometryTrianglesNV indexData(long value)
Sets the specified value to theindexData
field.
-
indexOffset
public VkGeometryTrianglesNV indexOffset(long value)
Sets the specified value to theindexOffset
field.
-
indexCount
public VkGeometryTrianglesNV indexCount(int value)
Sets the specified value to theindexCount
field.
-
indexType
public VkGeometryTrianglesNV indexType(int value)
Sets the specified value to theindexType
field.
-
transformData
public VkGeometryTrianglesNV transformData(long value)
Sets the specified value to thetransformData
field.
-
transformOffset
public VkGeometryTrianglesNV transformOffset(long value)
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
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 newVkGeometryTrianglesNV
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkGeometryTrianglesNV calloc()
Returns a newVkGeometryTrianglesNV
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkGeometryTrianglesNV create()
Returns a newVkGeometryTrianglesNV
instance allocated withBufferUtils
.
-
create
public static VkGeometryTrianglesNV create(long address)
Returns a newVkGeometryTrianglesNV
instance for the specified memory address.
-
createSafe
@Nullable public static VkGeometryTrianglesNV createSafe(long address)
-
malloc
public static VkGeometryTrianglesNV.Buffer malloc(int capacity)
Returns a newVkGeometryTrianglesNV.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkGeometryTrianglesNV.Buffer calloc(int capacity)
Returns a newVkGeometryTrianglesNV.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkGeometryTrianglesNV.Buffer create(int capacity)
Returns a newVkGeometryTrianglesNV.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkGeometryTrianglesNV.Buffer create(long address, int capacity)
Create aVkGeometryTrianglesNV.Buffer
instance 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 newVkGeometryTrianglesNV
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkGeometryTrianglesNV callocStack()
Returns a newVkGeometryTrianglesNV
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkGeometryTrianglesNV mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkGeometryTrianglesNV
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkGeometryTrianglesNV callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkGeometryTrianglesNV
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkGeometryTrianglesNV.Buffer callocStack(int capacity)
Returns a newVkGeometryTrianglesNV.Buffer
instance allocated on the thread-localMemoryStack
and 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.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and 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
.
-
-