Class VkGeometryNV

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

    public class VkGeometryNV
    extends Struct
    implements NativeResource
    Structure specifying a geometry in a bottom-level acceleration structure.
    Valid Usage (Implicit)
    • sType must be STRUCTURE_TYPE_GEOMETRY_NV
    • pNext must be NULL
    • geometryType must be a valid VkGeometryTypeNV value
    • geometry must be a valid VkGeometryDataNV structure
    • flags must be a valid combination of VkGeometryFlagBitsNV values
    See Also

    VkAccelerationStructureInfoNV, VkGeometryDataNV

    Member documentation

    • sType – the type of this structure.
    • pNextNULL or a pointer to an extension-specific structure.
    • geometryType – describes which type of geometry this VkGeometryNV refers to.
    • geometry – contains the geometry data as described in VkGeometryDataNV.
    • flags – has flags describing options for this geometry.

    Layout

    
     struct VkGeometryNV {
         VkStructureType sType;
         void const * pNext;
         VkGeometryTypeNV geometryType;
         VkGeometryDataNV geometry;
         VkGeometryFlagsNV flags;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • STYPE, PNEXT, GEOMETRYTYPE, GEOMETRY, FLAGS

        The struct member offsets.
    • Constructor Detail

      • VkGeometryNV

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

        public int geometryType()
        Returns the value of the geometryType field.
      • flags

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

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

        public VkGeometryNV pNext​(long value)
        Sets the specified value to the pNext field.
      • geometryType

        public VkGeometryNV geometryType​(int value)
        Sets the specified value to the geometryType field.
      • geometry

        public VkGeometryNV geometry​(java.util.function.Consumer<VkGeometryDataNV> consumer)
        Passes the geometry field to the specified Consumer.
      • flags

        public VkGeometryNV flags​(int value)
        Sets the specified value to the flags field.
      • set

        public VkGeometryNV set​(int sType,
                                long pNext,
                                int geometryType,
                                VkGeometryDataNV geometry,
                                int flags)
        Initializes this struct with the specified values.
      • set

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

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

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

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

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

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

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

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

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

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

        public static VkGeometryNV callocStack​(MemoryStack stack)
        Returns a new VkGeometryNV instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static VkGeometryNV.Buffer callocStack​(int capacity)
        Returns a new VkGeometryNV.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • callocStack

        public static VkGeometryNV.Buffer callocStack​(int capacity,
                                                      MemoryStack stack)
        Returns a new VkGeometryNV.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().
      • ngeometryType

        public static int ngeometryType​(long struct)
        Unsafe version of geometryType().
      • nflags

        public static int nflags​(long struct)
        Unsafe version of flags().
      • 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.
      • ngeometryType

        public static void ngeometryType​(long struct,
                                         int value)
        Unsafe version of geometryType.
      • nflags

        public static void nflags​(long struct,
                                  int value)
        Unsafe version of flags.