Class VkGeometryAABBNV

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

    public class VkGeometryAABBNV
    extends Struct
    implements NativeResource
    Structure specifying axis-aligned bounding box geometry in a bottom-level acceleration structure.
    Description

    The AABB data in memory is six 32-bit floats consisting of the minimum x, y, and z values followed by the maximum x, y, and z values.

    Valid Usage
    • offset must be less than the size of aabbData
    • offset must be a multiple of 8
    • stride must be a multiple of 8
    Valid Usage (Implicit)
    See Also

    VkGeometryDataNV

    Member documentation

    • sType – the type of this structure.
    • pNextNULL or a pointer to an extension-specific structure.
    • aabbData – the buffer containing axis-aligned bounding box data.
    • numAABBs – the number of AABBs in this geometry.
    • stride – the stride in bytes between AABBs in aabbData.
    • offset – the offset in bytes of the first AABB in aabbData.

    Layout

    
     struct VkGeometryAABBNV {
         VkStructureType sType;
         void const * pNext;
         VkBuffer aabbData;
         uint32_t numAABBs;
         uint32_t stride;
         VkDeviceSize offset;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • STYPE, PNEXT, AABBDATA, NUMAABBS, STRIDE, OFFSET

        The struct member offsets.
    • Constructor Detail

      • VkGeometryAABBNV

        public VkGeometryAABBNV​(java.nio.ByteBuffer container)
        Creates a VkGeometryAABBNV 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.
      • aabbData

        public long aabbData()
        Returns the value of the aabbData field.
      • numAABBs

        public int numAABBs()
        Returns the value of the numAABBs field.
      • stride

        public int stride()
        Returns the value of the stride field.
      • offset

        public long offset()
        Returns the value of the offset field.
      • sType

        public VkGeometryAABBNV sType​(int value)
        Sets the specified value to the sType field.
      • pNext

        public VkGeometryAABBNV pNext​(long value)
        Sets the specified value to the pNext field.
      • aabbData

        public VkGeometryAABBNV aabbData​(long value)
        Sets the specified value to the aabbData field.
      • numAABBs

        public VkGeometryAABBNV numAABBs​(int value)
        Sets the specified value to the numAABBs field.
      • stride

        public VkGeometryAABBNV stride​(int value)
        Sets the specified value to the stride field.
      • offset

        public VkGeometryAABBNV offset​(long value)
        Sets the specified value to the offset field.
      • set

        public VkGeometryAABBNV set​(int sType,
                                    long pNext,
                                    long aabbData,
                                    int numAABBs,
                                    int stride,
                                    long offset)
        Initializes this struct with the specified values.
      • set

        public VkGeometryAABBNV set​(VkGeometryAABBNV src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • malloc

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

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

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

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

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

        public static VkGeometryAABBNV mallocStack()
        Returns a new VkGeometryAABBNV instance allocated on the thread-local MemoryStack.
      • callocStack

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

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

        public static VkGeometryAABBNV callocStack​(MemoryStack stack)
        Returns a new VkGeometryAABBNV 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().
      • naabbData

        public static long naabbData​(long struct)
        Unsafe version of aabbData().
      • nnumAABBs

        public static int nnumAABBs​(long struct)
        Unsafe version of numAABBs().
      • nstride

        public static int nstride​(long struct)
        Unsafe version of stride().
      • noffset

        public static long noffset​(long struct)
        Unsafe version of offset().
      • 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.
      • naabbData

        public static void naabbData​(long struct,
                                     long value)
        Unsafe version of aabbData.
      • nnumAABBs

        public static void nnumAABBs​(long struct,
                                     int value)
        Unsafe version of numAABBs.
      • nstride

        public static void nstride​(long struct,
                                   int value)
        Unsafe version of stride.
      • noffset

        public static void noffset​(long struct,
                                   long value)
        Unsafe version of offset.