Class VkTransformMatrixKHR

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkTransformMatrixKHR>
org.lwjgl.vulkan.VkTransformMatrixKHR
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer
Direct Known Subclasses:
VkTransformMatrixNV

public class VkTransformMatrixKHR extends org.lwjgl.system.Struct<VkTransformMatrixKHR> implements org.lwjgl.system.NativeResource
Structure specifying a 3x4 affine transformation matrix.
Valid Usage
  • The first three columns of matrix must define an invertible 3x3 matrix
See Also

VkAccelerationStructureInstanceKHR, VkAccelerationStructureMatrixMotionInstanceNV

Layout


 struct VkTransformMatrixKHR {
     float matrix()[3][4];
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • MATRIX

      public static final int MATRIX
      The struct member offsets.
  • Constructor Details

    • VkTransformMatrixKHR

      public VkTransformMatrixKHR(ByteBuffer container)
      Creates a VkTransformMatrixKHR 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 Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<VkTransformMatrixKHR>
    • matrix

      public FloatBuffer matrix()
      a 3x4 row-major affine transformation matrix.
    • matrix

      public float matrix(int index)
      a 3x4 row-major affine transformation matrix.
    • matrix

      public VkTransformMatrixKHR matrix(FloatBuffer value)
      Copies the specified FloatBuffer to the matrix() field.
    • matrix

      public VkTransformMatrixKHR matrix(int index, float value)
      Sets the specified value at the specified index of the matrix() field.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

      public static VkTransformMatrixKHR create()
      Returns a new VkTransformMatrixKHR instance allocated with BufferUtils.
    • create

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

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

      public static VkTransformMatrixKHR.Buffer malloc(int capacity)
      Returns a new VkTransformMatrixKHR.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static VkTransformMatrixKHR.Buffer calloc(int capacity)
      Returns a new VkTransformMatrixKHR.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static VkTransformMatrixKHR.Buffer create(int capacity)
      Returns a new VkTransformMatrixKHR.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

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

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

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

      public static VkTransformMatrixKHR calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new VkTransformMatrixKHR instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

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

      public static VkTransformMatrixKHR.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new VkTransformMatrixKHR.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nmatrix

      public static FloatBuffer nmatrix(long struct)
      Unsafe version of matrix().
    • nmatrix

      public static float nmatrix(long struct, int index)
      Unsafe version of matrix.
    • nmatrix

      public static void nmatrix(long struct, FloatBuffer value)
      Unsafe version of matrix.
    • nmatrix

      public static void nmatrix(long struct, int index, float value)
      Unsafe version of matrix.