Class VkSRTDataNV

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

    public class VkSRTDataNV
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Structure specifying a transform in SRT decomposition.
    Description

    This transform decomposition consists of three elements. The first is a matrix S, consisting of a scale, shear, and translation, usually used to define the pivot point of the following rotation. This matrix is constructed from the parameters above by:

    S =

    sxabpvx
    0sycpvy
    00szpvz

    The rotation quaternion is defined as:

    R = [ qx, qy, qz, qw ]

    This is a rotation around a conceptual normalized axis [ ax, ay, az ] of amount theta such that:

    [ qx, qy, qz ] = sin(theta/2) × [ ax, ay, az ]

    and

    qw = cos(theta/2)

    Finally, the transform has a translation T constructed from the parameters above by:

    T =

    100tx
    010ty
    001tz

    The effective derived transform is then given by

    T × R × S
    See Also

    VkAccelerationStructureSRTMotionInstanceNV

    Layout

    
     struct VkSRTDataNV {
         float sx();
         float a();
         float b();
         float pvx();
         float sy();
         float c();
         float pvy();
         float sz();
         float pvz();
         float qx();
         float qy();
         float qz();
         float qw();
         float tx();
         float ty();
         float tz();
     }
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  VkSRTDataNV.Buffer
      An array of VkSRTDataNV structs.
      • Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

        org.lwjgl.system.Pointer.Default
      • Nested classes/interfaces inherited from class org.lwjgl.system.Struct

        org.lwjgl.system.Struct.StructValidation
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int A
      The struct member offsets.
      static int ALIGNOF
      The struct alignment in bytes.
      static int B
      C
      PVX
      PVY
      PVZ
      QW
      QX
      QY
      QZ
      The struct member offsets.
      static int SIZEOF
      The struct size in bytes.
      static int SX
      SY
      SZ
      TX
      TY
      TZ
      The struct member offsets.
      • Fields inherited from interface org.lwjgl.system.Pointer

        BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
    • Constructor Summary

      Constructors 
      Constructor Description
      VkSRTDataNV​(java.nio.ByteBuffer container)
      Creates a VkSRTDataNV instance at the current position of the specified ByteBuffer container.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      float a()
      one component of the shear for the transform
      VkSRTDataNV a​(float value)
      Sets the specified value to the a() field.
      float b()
      one component of the shear for the transform
      VkSRTDataNV b​(float value)
      Sets the specified value to the b() field.
      float c()
      one component of the shear for the transform
      VkSRTDataNV c​(float value)
      Sets the specified value to the c() field.
      static VkSRTDataNV calloc()
      Returns a new VkSRTDataNV instance allocated with memCalloc.
      static VkSRTDataNV.Buffer calloc​(int capacity)
      Returns a new VkSRTDataNV.Buffer instance allocated with memCalloc.
      static VkSRTDataNV.Buffer calloc​(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new VkSRTDataNV.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      static VkSRTDataNV calloc​(org.lwjgl.system.MemoryStack stack)
      Returns a new VkSRTDataNV instance allocated on the specified MemoryStack and initializes all its bits to zero.
      static VkSRTDataNV create()
      Returns a new VkSRTDataNV instance allocated with BufferUtils.
      static VkSRTDataNV.Buffer create​(int capacity)
      Returns a new VkSRTDataNV.Buffer instance allocated with BufferUtils.
      static VkSRTDataNV create​(long address)
      Returns a new VkSRTDataNV instance for the specified memory address.
      static VkSRTDataNV.Buffer create​(long address, int capacity)
      Create a VkSRTDataNV.Buffer instance at the specified memory.
      static VkSRTDataNV createSafe​(long address)
      Like create, but returns null if address is NULL.
      static VkSRTDataNV.Buffer createSafe​(long address, int capacity)
      Like create, but returns null if address is NULL.
      static VkSRTDataNV malloc()
      Returns a new VkSRTDataNV instance allocated with memAlloc.
      static VkSRTDataNV.Buffer malloc​(int capacity)
      Returns a new VkSRTDataNV.Buffer instance allocated with memAlloc.
      static VkSRTDataNV.Buffer malloc​(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new VkSRTDataNV.Buffer instance allocated on the specified MemoryStack.
      static VkSRTDataNV malloc​(org.lwjgl.system.MemoryStack stack)
      Returns a new VkSRTDataNV instance allocated on the specified MemoryStack.
      static float na​(long struct)
      Unsafe version of a().
      static void na​(long struct, float value)
      Unsafe version of a.
      static float nb​(long struct)
      Unsafe version of b().
      static void nb​(long struct, float value)
      Unsafe version of b.
      static float nc​(long struct)
      Unsafe version of c().
      static void nc​(long struct, float value)
      Unsafe version of c.
      static float npvx​(long struct)
      Unsafe version of pvx().
      static void npvx​(long struct, float value)
      Unsafe version of pvx.
      static float npvy​(long struct)
      Unsafe version of pvy().
      static void npvy​(long struct, float value)
      Unsafe version of pvy.
      static float npvz​(long struct)
      Unsafe version of pvz().
      static void npvz​(long struct, float value)
      Unsafe version of pvz.
      static float nqw​(long struct)
      Unsafe version of qw().
      static void nqw​(long struct, float value)
      Unsafe version of qw.
      static float nqx​(long struct)
      Unsafe version of qx().
      static void nqx​(long struct, float value)
      Unsafe version of qx.
      static float nqy​(long struct)
      Unsafe version of qy().
      static void nqy​(long struct, float value)
      Unsafe version of qy.
      static float nqz​(long struct)
      Unsafe version of qz().
      static void nqz​(long struct, float value)
      Unsafe version of qz.
      static float nsx​(long struct)
      Unsafe version of sx().
      static void nsx​(long struct, float value)
      Unsafe version of sx.
      static float nsy​(long struct)
      Unsafe version of sy().
      static void nsy​(long struct, float value)
      Unsafe version of sy.
      static float nsz​(long struct)
      Unsafe version of sz().
      static void nsz​(long struct, float value)
      Unsafe version of sz.
      static float ntx​(long struct)
      Unsafe version of tx().
      static void ntx​(long struct, float value)
      Unsafe version of tx.
      static float nty​(long struct)
      Unsafe version of ty().
      static void nty​(long struct, float value)
      Unsafe version of ty.
      static float ntz​(long struct)
      Unsafe version of tz().
      static void ntz​(long struct, float value)
      Unsafe version of tz.
      float pvx()
      the x component of the pivot point of the transform
      VkSRTDataNV pvx​(float value)
      Sets the specified value to the pvx() field.
      float pvy()
      the y component of the pivot point of the transform
      VkSRTDataNV pvy​(float value)
      Sets the specified value to the pvy() field.
      float pvz()
      the z component of the pivot point of the transform
      VkSRTDataNV pvz​(float value)
      Sets the specified value to the pvz() field.
      float qw()
      the w component of the rotation quaternion
      VkSRTDataNV qw​(float value)
      Sets the specified value to the qw() field.
      float qx()
      the x component of the rotation quaternion
      VkSRTDataNV qx​(float value)
      Sets the specified value to the qx() field.
      float qy()
      the y component of the rotation quaternion
      VkSRTDataNV qy​(float value)
      Sets the specified value to the qy() field.
      float qz()
      the z component of the rotation quaternion
      VkSRTDataNV qz​(float value)
      Sets the specified value to the qz() field.
      VkSRTDataNV set​(float sx, float a, float b, float pvx, float sy, float c, float pvy, float sz, float pvz, float qx, float qy, float qz, float qw, float tx, float ty, float tz)
      Initializes this struct with the specified values.
      VkSRTDataNV set​(VkSRTDataNV src)
      Copies the specified struct data to this struct.
      int sizeof()  
      float sx()
      the x component of the scale of the transform
      VkSRTDataNV sx​(float value)
      Sets the specified value to the sx() field.
      float sy()
      the y component of the scale of the transform
      VkSRTDataNV sy​(float value)
      Sets the specified value to the sy() field.
      float sz()
      the z component of the scale of the transform
      VkSRTDataNV sz​(float value)
      Sets the specified value to the sz() field.
      float tx()
      the x component of the post-rotation translation
      VkSRTDataNV tx​(float value)
      Sets the specified value to the tx() field.
      float ty()
      the y component of the post-rotation translation
      VkSRTDataNV ty​(float value)
      Sets the specified value to the ty() field.
      float tz()
      the z component of the post-rotation translation
      VkSRTDataNV tz​(float value)
      Sets the specified value to the tz() field.
      • Methods inherited from interface org.lwjgl.system.NativeResource

        close, free
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from class org.lwjgl.system.Pointer.Default

        address, equals, hashCode, toString
      • Methods inherited from class org.lwjgl.system.Struct

        clear, free, isNull, validate
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • SX, A, B, PVX, SY, C, PVY, SZ, PVZ, QX, QY, QZ, QW, TX, TY, TZ

        The struct member offsets.
    • Constructor Detail

      • VkSRTDataNV

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

        public float sx()
        the x component of the scale of the transform
      • a, b

        public float a()
        
        public float b()
        
        one component of the shear for the transform
      • pvx

        public float pvx()
        the x component of the pivot point of the transform
      • sy

        public float sy()
        the y component of the scale of the transform
      • c

        public float c()
        one component of the shear for the transform
      • pvy

        public float pvy()
        the y component of the pivot point of the transform
      • sz

        public float sz()
        the z component of the scale of the transform
      • pvz

        public float pvz()
        the z component of the pivot point of the transform
      • qx

        public float qx()
        the x component of the rotation quaternion
      • qy

        public float qy()
        the y component of the rotation quaternion
      • qz

        public float qz()
        the z component of the rotation quaternion
      • qw

        public float qw()
        the w component of the rotation quaternion
      • tx

        public float tx()
        the x component of the post-rotation translation
      • ty

        public float ty()
        the y component of the post-rotation translation
      • tz

        public float tz()
        the z component of the post-rotation translation
      • sx

        public VkSRTDataNV sx​(float value)
        Sets the specified value to the sx() field.
      • a

        public VkSRTDataNV a​(float value)
        Sets the specified value to the a() field.
      • b

        public VkSRTDataNV b​(float value)
        Sets the specified value to the b() field.
      • pvx

        public VkSRTDataNV pvx​(float value)
        Sets the specified value to the pvx() field.
      • sy

        public VkSRTDataNV sy​(float value)
        Sets the specified value to the sy() field.
      • c

        public VkSRTDataNV c​(float value)
        Sets the specified value to the c() field.
      • pvy

        public VkSRTDataNV pvy​(float value)
        Sets the specified value to the pvy() field.
      • sz

        public VkSRTDataNV sz​(float value)
        Sets the specified value to the sz() field.
      • pvz

        public VkSRTDataNV pvz​(float value)
        Sets the specified value to the pvz() field.
      • qx

        public VkSRTDataNV qx​(float value)
        Sets the specified value to the qx() field.
      • qy

        public VkSRTDataNV qy​(float value)
        Sets the specified value to the qy() field.
      • qz

        public VkSRTDataNV qz​(float value)
        Sets the specified value to the qz() field.
      • qw

        public VkSRTDataNV qw​(float value)
        Sets the specified value to the qw() field.
      • tx

        public VkSRTDataNV tx​(float value)
        Sets the specified value to the tx() field.
      • ty

        public VkSRTDataNV ty​(float value)
        Sets the specified value to the ty() field.
      • tz

        public VkSRTDataNV tz​(float value)
        Sets the specified value to the tz() field.
      • set

        public VkSRTDataNV set​(float sx,
                               float a,
                               float b,
                               float pvx,
                               float sy,
                               float c,
                               float pvy,
                               float sz,
                               float pvz,
                               float qx,
                               float qy,
                               float qz,
                               float qw,
                               float tx,
                               float ty,
                               float tz)
        Initializes this struct with the specified values.
      • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        public static VkSRTDataNV.Buffer calloc​(int capacity,
                                                org.lwjgl.system.MemoryStack stack)
        Returns a new VkSRTDataNV.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
      • nsx

        public static float nsx​(long struct)
        Unsafe version of sx().
      • na

        public static float na​(long struct)
        Unsafe version of a().
      • nb

        public static float nb​(long struct)
        Unsafe version of b().
      • npvx

        public static float npvx​(long struct)
        Unsafe version of pvx().
      • nsy

        public static float nsy​(long struct)
        Unsafe version of sy().
      • nc

        public static float nc​(long struct)
        Unsafe version of c().
      • npvy

        public static float npvy​(long struct)
        Unsafe version of pvy().
      • nsz

        public static float nsz​(long struct)
        Unsafe version of sz().
      • npvz

        public static float npvz​(long struct)
        Unsafe version of pvz().
      • nqx

        public static float nqx​(long struct)
        Unsafe version of qx().
      • nqy

        public static float nqy​(long struct)
        Unsafe version of qy().
      • nqz

        public static float nqz​(long struct)
        Unsafe version of qz().
      • nqw

        public static float nqw​(long struct)
        Unsafe version of qw().
      • ntx

        public static float ntx​(long struct)
        Unsafe version of tx().
      • nty

        public static float nty​(long struct)
        Unsafe version of ty().
      • ntz

        public static float ntz​(long struct)
        Unsafe version of tz().
      • nsx

        public static void nsx​(long struct,
                               float value)
        Unsafe version of sx.
      • na

        public static void na​(long struct,
                              float value)
        Unsafe version of a.
      • nb

        public static void nb​(long struct,
                              float value)
        Unsafe version of b.
      • npvx

        public static void npvx​(long struct,
                                float value)
        Unsafe version of pvx.
      • nsy

        public static void nsy​(long struct,
                               float value)
        Unsafe version of sy.
      • nc

        public static void nc​(long struct,
                              float value)
        Unsafe version of c.
      • npvy

        public static void npvy​(long struct,
                                float value)
        Unsafe version of pvy.
      • nsz

        public static void nsz​(long struct,
                               float value)
        Unsafe version of sz.
      • npvz

        public static void npvz​(long struct,
                                float value)
        Unsafe version of pvz.
      • nqx

        public static void nqx​(long struct,
                               float value)
        Unsafe version of qx.
      • nqy

        public static void nqy​(long struct,
                               float value)
        Unsafe version of qy.
      • nqz

        public static void nqz​(long struct,
                               float value)
        Unsafe version of qz.
      • nqw

        public static void nqw​(long struct,
                               float value)
        Unsafe version of qw.
      • ntx

        public static void ntx​(long struct,
                               float value)
        Unsafe version of tx.
      • nty

        public static void nty​(long struct,
                               float value)
        Unsafe version of ty.
      • ntz

        public static void ntz​(long struct,
                               float value)
        Unsafe version of tz.