Class VkTransformMatrixKHR

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer
    Direct Known Subclasses:
    VkTransformMatrixNV

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

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • MATRIX

        The struct member offsets.
    • Constructor Detail

      • VkTransformMatrixKHR

        public VkTransformMatrixKHR​(java.nio.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 Detail

      • sizeof

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

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

        public VkTransformMatrixKHR matrix​(int index,
                                           float value)
        Sets the specified value at the specified index of the matrix() field.
      • 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

        @Nullable
        public static VkTransformMatrixKHR createSafe​(long address)
        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:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • nmatrix

        public static java.nio.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,
                                   java.nio.FloatBuffer value)
        Unsafe version of matrix.
      • nmatrix

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