Class VkGeometryAABBNV

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

    public class VkGeometryAABBNV
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.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

    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()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • sType

        public int sType()
        the type of this structure.
      • pNext

        public long pNext()
        NULL or a pointer to a structure extending this structure.
      • aabbData

        public long aabbData()
        the buffer containing axis-aligned bounding box data.
      • numAABBs

        public int numAABBs()
        the number of AABBs in this geometry.
      • stride

        public int stride()
        the stride in bytes between AABBs in aabbData.
      • offset

        public long offset()
        the offset in bytes of the first AABB in aabbData.
      • 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()
        Returns a new VkGeometryAABBNV instance allocated with BufferUtils.
      • 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

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

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

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

        public static VkGeometryAABBNV calloc​(org.lwjgl.system.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
      • malloc

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

        public static VkGeometryAABBNV.Buffer calloc​(int capacity,
                                                     org.lwjgl.system.MemoryStack stack)
        Returns a new VkGeometryAABBNV.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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.