Class VkAccelerationStructureGeometryDataKHR

java.lang.Object
overrungl.struct.GroupType
overrungl.vulkan.khr.union.VkAccelerationStructureGeometryDataKHR
All Implemented Interfaces:
Addressable
Direct Known Subclasses:
VkAccelerationStructureGeometryDataKHR.Buffer

public sealed class VkAccelerationStructureGeometryDataKHR extends GroupType permits VkAccelerationStructureGeometryDataKHR.Buffer

Layout

union VkAccelerationStructureGeometryDataKHR {
    (struct VkAccelerationStructureGeometryTrianglesDataKHR) VkAccelerationStructureGeometryTrianglesDataKHR triangles;
    (struct VkAccelerationStructureGeometryAabbsDataKHR) VkAccelerationStructureGeometryAabbsDataKHR aabbs;
    (struct VkAccelerationStructureGeometryInstancesDataKHR) VkAccelerationStructureGeometryInstancesDataKHR instances;
};
  • Field Details

    • LAYOUT

      public static final GroupLayout LAYOUT
      The union layout of VkAccelerationStructureGeometryDataKHR.
    • OFFSET_triangles

      public static final long OFFSET_triangles
      The byte offset of triangles.
    • LAYOUT_triangles

      public static final MemoryLayout LAYOUT_triangles
      The memory layout of triangles.
    • OFFSET_aabbs

      public static final long OFFSET_aabbs
      The byte offset of aabbs.
    • LAYOUT_aabbs

      public static final MemoryLayout LAYOUT_aabbs
      The memory layout of aabbs.
    • OFFSET_instances

      public static final long OFFSET_instances
      The byte offset of instances.
    • LAYOUT_instances

      public static final MemoryLayout LAYOUT_instances
      The memory layout of instances.
  • Constructor Details

    • VkAccelerationStructureGeometryDataKHR

      public VkAccelerationStructureGeometryDataKHR(MemorySegment segment)
      Creates VkAccelerationStructureGeometryDataKHR with the given segment.
      Parameters:
      segment - the memory segment
  • Method Details

    • of

      Creates VkAccelerationStructureGeometryDataKHR with the given segment.
      Parameters:
      segment - the memory segment
      Returns:
      the created instance or null if the segment is NULL
    • ofNative

      public static VkAccelerationStructureGeometryDataKHR ofNative(MemorySegment segment)

      Creates VkAccelerationStructureGeometryDataKHR with the given segment.

      Reinterprets the segment if zero-length.

      Parameters:
      segment - the memory segment
      Returns:
      the created instance or null if the segment is NULL
    • ofNative

      public static VkAccelerationStructureGeometryDataKHR.Buffer ofNative(MemorySegment segment, long count)

      Creates VkAccelerationStructureGeometryDataKHR with the given segment.

      Reinterprets the segment if zero-length.

      Parameters:
      segment - the memory segment
      count - the count of the buffer
      Returns:
      the created instance or null if the segment is NULL
    • alloc

      Allocates a VkAccelerationStructureGeometryDataKHR with the given segment allocator.
      Parameters:
      allocator - the segment allocator
      Returns:
      the allocated VkAccelerationStructureGeometryDataKHR
    • alloc

      public static VkAccelerationStructureGeometryDataKHR.Buffer alloc(SegmentAllocator allocator, long count)
      Allocates a VkAccelerationStructureGeometryDataKHR with the given segment allocator and count.
      Parameters:
      allocator - the segment allocator
      count - the count
      Returns:
      the allocated VkAccelerationStructureGeometryDataKHR
    • copyFrom

      Copies from the given source.
      Parameters:
      src - the source
      Returns:
      this
    • asBuffer

      Converts this instance to a buffer.
      Returns:
      the buffer
    • triangles

      public static MemorySegment triangles(MemorySegment segment, long index)
      Returns triangles at the given index.
      Parameters:
      segment - the segment of the union
      index - the index of the union buffer
      Returns:
      triangles at the given index
    • triangles

      public MemorySegment triangles()
      Returns triangles.
      Returns:
      triangles
    • triangles

      public static void triangles(MemorySegment segment, long index, MemorySegment value)
      Sets triangles with the given value at the given index.
      Parameters:
      segment - the segment of the union
      index - the index of the union buffer
      value - the value
    • triangles

      Sets triangles with the given value.
      Parameters:
      value - the value
      Returns:
      this
    • aabbs

      public static MemorySegment aabbs(MemorySegment segment, long index)
      Returns aabbs at the given index.
      Parameters:
      segment - the segment of the union
      index - the index of the union buffer
      Returns:
      aabbs at the given index
    • aabbs

      public MemorySegment aabbs()
      Returns aabbs.
      Returns:
      aabbs
    • aabbs

      public static void aabbs(MemorySegment segment, long index, MemorySegment value)
      Sets aabbs with the given value at the given index.
      Parameters:
      segment - the segment of the union
      index - the index of the union buffer
      value - the value
    • aabbs

      Sets aabbs with the given value.
      Parameters:
      value - the value
      Returns:
      this
    • instances

      public static MemorySegment instances(MemorySegment segment, long index)
      Returns instances at the given index.
      Parameters:
      segment - the segment of the union
      index - the index of the union buffer
      Returns:
      instances at the given index
    • instances

      public MemorySegment instances()
      Returns instances.
      Returns:
      instances
    • instances

      public static void instances(MemorySegment segment, long index, MemorySegment value)
      Sets instances with the given value at the given index.
      Parameters:
      segment - the segment of the union
      index - the index of the union buffer
      value - the value
    • instances

      Sets instances with the given value.
      Parameters:
      value - the value
      Returns:
      this