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
Valid Usage (Implicit)
  • sType must be STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV
  • pNext must be NULL
  • If vertexData is not NULL_HANDLE, vertexData must be a valid VkBuffer handle
  • vertexFormat must be a valid VkFormat value
  • If indexData is not NULL_HANDLE, indexData must be a valid VkBuffer handle
  • indexType must be a valid VkIndexType value
  • If transformData is not NULL_HANDLE, transformData must be a valid VkBuffer handle
  • Each of indexData, transformData, and vertexData that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice
See Also

VkGeometryDataNV

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();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • STYPE

      public static final int STYPE
      The struct member offsets.
    • PNEXT

      public static final int PNEXT
      The struct member offsets.
    • VERTEXDATA

      public static final int VERTEXDATA
      The struct member offsets.
    • VERTEXOFFSET

      public static final int VERTEXOFFSET
      The struct member offsets.
    • VERTEXCOUNT

      public static final int VERTEXCOUNT
      The struct member offsets.
    • VERTEXSTRIDE

      public static final int VERTEXSTRIDE
      The struct member offsets.
    • VERTEXFORMAT

      public static final int VERTEXFORMAT
      The struct member offsets.
    • INDEXDATA

      public static final int INDEXDATA
      The struct member offsets.
    • INDEXOFFSET

      public static final int INDEXOFFSET
      The struct member offsets.
    • INDEXCOUNT

      public static final int INDEXCOUNT
      The struct member offsets.
    • INDEXTYPE

      public static final int INDEXTYPE
      The struct member offsets.
    • TRANSFORMDATA

      public static final int TRANSFORMDATA
      The struct member offsets.
    • TRANSFORMOFFSET

      public static final int TRANSFORMOFFSET
      The struct member offsets.
  • Constructor Details

    • VkGeometryTrianglesNV

      public VkGeometryTrianglesNV(ByteBuffer container)
      Creates a VkGeometryTrianglesNV instance at the current position of the specified ByteBuffer 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 Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<VkGeometryTrianglesNV>
    • sType

      public int sType()
      a VkStructureType value identifying this structure.
    • pNext

      public long pNext()
      NULL or 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 within vertexData containing 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()
      a VkFormat describing 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 within indexData containing index data for this geometry.
    • indexCount

      public int indexCount()
      the number of indices to include in this geometry.
    • indexType

      public int indexType()
      a VkIndexType describing the format of each index.
    • transformData

      public long transformData()
      an optional buffer containing an VkTransformMatrixNV structure defining a transformation to be applied to this geometry.
    • transformOffset

      public long transformOffset()
      the offset in bytes in transformData of the transform information described above.
    • sType

      public VkGeometryTrianglesNV sType(int value)
      Sets the specified value to the sType() field.
    • sType$Default

      public VkGeometryTrianglesNV sType$Default()
      Sets the STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV value to the sType() field.
    • pNext

      public VkGeometryTrianglesNV pNext(long value)
      Sets the specified value to the pNext() field.
    • vertexData

      public VkGeometryTrianglesNV vertexData(long value)
      Sets the specified value to the vertexData() field.
    • vertexOffset

      public VkGeometryTrianglesNV vertexOffset(long value)
      Sets the specified value to the vertexOffset() field.
    • vertexCount

      public VkGeometryTrianglesNV vertexCount(int value)
      Sets the specified value to the vertexCount() field.
    • vertexStride

      public VkGeometryTrianglesNV vertexStride(long value)
      Sets the specified value to the vertexStride() field.
    • vertexFormat

      public VkGeometryTrianglesNV vertexFormat(int value)
      Sets the specified value to the vertexFormat() field.
    • indexData

      public VkGeometryTrianglesNV indexData(long value)
      Sets the specified value to the indexData() field.
    • indexOffset

      public VkGeometryTrianglesNV indexOffset(long value)
      Sets the specified value to the indexOffset() field.
    • indexCount

      public VkGeometryTrianglesNV indexCount(int value)
      Sets the specified value to the indexCount() field.
    • indexType

      public VkGeometryTrianglesNV indexType(int value)
      Sets the specified value to the indexType() field.
    • transformData

      public VkGeometryTrianglesNV transformData(long value)
      Sets the specified value to the transformData() field.
    • transformOffset

      public VkGeometryTrianglesNV transformOffset(long value)
      Sets the specified value to the transformOffset() 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

      public static VkGeometryTrianglesNV malloc()
      Returns a new VkGeometryTrianglesNV instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static VkGeometryTrianglesNV calloc()
      Returns a new VkGeometryTrianglesNV instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static VkGeometryTrianglesNV create()
      Returns a new VkGeometryTrianglesNV instance allocated with BufferUtils.
    • create

      public static VkGeometryTrianglesNV create(long address)
      Returns a new VkGeometryTrianglesNV instance for the specified memory address.
    • createSafe

      public static @Nullable VkGeometryTrianglesNV createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static VkGeometryTrianglesNV.Buffer malloc(int capacity)
      Returns a new VkGeometryTrianglesNV.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static VkGeometryTrianglesNV.Buffer calloc(int capacity)
      Returns a new VkGeometryTrianglesNV.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static VkGeometryTrianglesNV.Buffer create(int capacity)
      Returns a new VkGeometryTrianglesNV.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static VkGeometryTrianglesNV.Buffer create(long address, int capacity)
      Create a VkGeometryTrianglesNV.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable VkGeometryTrianglesNV.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • mallocStack

      @Deprecated public static VkGeometryTrianglesNV mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static VkGeometryTrianglesNV callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static VkGeometryTrianglesNV mallocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static VkGeometryTrianglesNV callocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static VkGeometryTrianglesNV.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static VkGeometryTrianglesNV.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(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. Use malloc(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. Use calloc(int, MemoryStack) instead.
    • malloc

      public static VkGeometryTrianglesNV malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new VkGeometryTrianglesNV instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static VkGeometryTrianglesNV calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new VkGeometryTrianglesNV instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static VkGeometryTrianglesNV.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new VkGeometryTrianglesNV.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static VkGeometryTrianglesNV.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new VkGeometryTrianglesNV.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nsType

      public static int nsType(long struct)
      Unsafe version of sType().
    • npNext

      public static long npNext(long struct)
      Unsafe version of pNext().
    • nvertexData

      public static long nvertexData(long struct)
      Unsafe version of vertexData().
    • nvertexOffset

      public static long nvertexOffset(long struct)
      Unsafe version of vertexOffset().
    • nvertexCount

      public static int nvertexCount(long struct)
      Unsafe version of vertexCount().
    • nvertexStride

      public static long nvertexStride(long struct)
      Unsafe version of vertexStride().
    • nvertexFormat

      public static int nvertexFormat(long struct)
      Unsafe version of vertexFormat().
    • nindexData

      public static long nindexData(long struct)
      Unsafe version of indexData().
    • nindexOffset

      public static long nindexOffset(long struct)
      Unsafe version of indexOffset().
    • nindexCount

      public static int nindexCount(long struct)
      Unsafe version of indexCount().
    • nindexType

      public static int nindexType(long struct)
      Unsafe version of indexType().
    • ntransformData

      public static long ntransformData(long struct)
      Unsafe version of transformData().
    • ntransformOffset

      public static long ntransformOffset(long struct)
      Unsafe version of transformOffset().
    • nsType

      public static void nsType(long struct, int value)
      Unsafe version of sType.
    • npNext

      public static void npNext(long struct, long value)
      Unsafe version of pNext.
    • nvertexData

      public static void nvertexData(long struct, long value)
      Unsafe version of vertexData.
    • nvertexOffset

      public static void nvertexOffset(long struct, long value)
      Unsafe version of vertexOffset.
    • nvertexCount

      public static void nvertexCount(long struct, int value)
      Unsafe version of vertexCount.
    • nvertexStride

      public static void nvertexStride(long struct, long value)
      Unsafe version of vertexStride.
    • nvertexFormat

      public static void nvertexFormat(long struct, int value)
      Unsafe version of vertexFormat.
    • nindexData

      public static void nindexData(long struct, long value)
      Unsafe version of indexData.
    • nindexOffset

      public static void nindexOffset(long struct, long value)
      Unsafe version of indexOffset.
    • nindexCount

      public static void nindexCount(long struct, int value)
      Unsafe version of indexCount.
    • nindexType

      public static void nindexType(long struct, int value)
      Unsafe version of indexType.
    • ntransformData

      public static void ntransformData(long struct, long value)
      Unsafe version of transformData.
    • ntransformOffset

      public static void ntransformOffset(long struct, long value)
      Unsafe version of transformOffset.