Class VkGeometryTrianglesNV

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class VkGeometryTrianglesNV
    extends Struct
    implements 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 must have been created, allocated, or retrieved from the same VkDevice
    See Also

    VkGeometryDataNV

    Member documentation

    • sType – the type of this structure.
    • pNextNULL or a pointer to an extension-specific structure.
    • vertexData – the buffer containing vertex data for this geometry.
    • vertexOffset – the offset in bytes within vertexData 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 within indexData 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 in transformData 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;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • STYPE, PNEXT, VERTEXDATA, VERTEXOFFSET, VERTEXCOUNT, VERTEXSTRIDE, VERTEXFORMAT, INDEXDATA, INDEXOFFSET, INDEXCOUNT, INDEXTYPE, TRANSFORMDATA, TRANSFORMOFFSET

        The struct member offsets.
    • Constructor Detail

      • VkGeometryTrianglesNV

        public VkGeometryTrianglesNV​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • sType

        public int sType()
        Returns the value of the sType field.
      • pNext

        public long pNext()
        Returns the value of the pNext field.
      • vertexData

        public long vertexData()
        Returns the value of the vertexData field.
      • vertexOffset

        public long vertexOffset()
        Returns the value of the vertexOffset field.
      • vertexCount

        public int vertexCount()
        Returns the value of the vertexCount field.
      • vertexStride

        public long vertexStride()
        Returns the value of the vertexStride field.
      • vertexFormat

        public int vertexFormat()
        Returns the value of the vertexFormat field.
      • indexData

        public long indexData()
        Returns the value of the indexData field.
      • indexOffset

        public long indexOffset()
        Returns the value of the indexOffset field.
      • indexCount

        public int indexCount()
        Returns the value of the indexCount field.
      • indexType

        public int indexType()
        Returns the value of the indexType field.
      • transformData

        public long transformData()
        Returns the value of the transformData field.
      • transformOffset

        public long transformOffset()
        Returns the value of the transformOffset 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.
      • 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​(long address)
        Returns a new VkGeometryTrianglesNV instance for the specified memory address.
      • createSafe

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

        public static VkGeometryTrianglesNV callocStack()
        Returns a new VkGeometryTrianglesNV instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static VkGeometryTrianglesNV mallocStack​(MemoryStack stack)
        Returns a new VkGeometryTrianglesNV instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static VkGeometryTrianglesNV callocStack​(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
      • 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.