Package org.lwjgl.vulkan
Class VkSRTDataNV
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.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.NativeResourceStructure 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 =
sx a b pvx 0 sy c pvy 0 0 sz pvz The rotation quaternion is defined as:
R = [ qx, qy, qz, qw ]
This is a rotation around a conceptual normalized axis
[ ax, ay, az ]of amountthetasuch 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 =
1 0 0 tx 0 1 0 ty 0 0 1 tz The effective derived transform is then given by
T × R × S
See Also
VkAccelerationStructureSRTMotionInstanceNVLayout
struct VkSRTDataNV { floatsx(); floata(); floatb(); floatpvx(); floatsy(); floatc(); floatpvy(); floatsz(); floatpvz(); floatqx(); floatqy(); floatqz(); floatqw(); floattx(); floatty(); floattz(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkSRTDataNV.BufferAn array ofVkSRTDataNVstructs.
-
Field Summary
Fields Modifier and Type Field Description static intAThe struct member offsets.static intALIGNOFThe struct alignment in bytes.static intB
C
PVX
PVY
PVZ
QW
QX
QY
QZThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSX
SY
SZ
TX
TY
TZThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkSRTDataNV(java.nio.ByteBuffer container)Creates aVkSRTDataNVinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description floata()one component of the shear for the transformVkSRTDataNVa(float value)Sets the specified value to thea()field.floatb()one component of the shear for the transformVkSRTDataNVb(float value)Sets the specified value to theb()field.floatc()one component of the shear for the transformVkSRTDataNVc(float value)Sets the specified value to thec()field.static VkSRTDataNVcalloc()Returns a newVkSRTDataNVinstance allocated withmemCalloc.static VkSRTDataNV.Buffercalloc(int capacity)Returns a newVkSRTDataNV.Bufferinstance allocated withmemCalloc.static VkSRTDataNV.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkSRTDataNV.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkSRTDataNVcalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkSRTDataNVinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkSRTDataNVcreate()Returns a newVkSRTDataNVinstance allocated withBufferUtils.static VkSRTDataNV.Buffercreate(int capacity)Returns a newVkSRTDataNV.Bufferinstance allocated withBufferUtils.static VkSRTDataNVcreate(long address)Returns a newVkSRTDataNVinstance for the specified memory address.static VkSRTDataNV.Buffercreate(long address, int capacity)Create aVkSRTDataNV.Bufferinstance at the specified memory.static VkSRTDataNVcreateSafe(long address)static VkSRTDataNV.BuffercreateSafe(long address, int capacity)static VkSRTDataNVmalloc()Returns a newVkSRTDataNVinstance allocated withmemAlloc.static VkSRTDataNV.Buffermalloc(int capacity)Returns a newVkSRTDataNV.Bufferinstance allocated withmemAlloc.static VkSRTDataNV.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkSRTDataNV.Bufferinstance allocated on the specifiedMemoryStack.static VkSRTDataNVmalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkSRTDataNVinstance allocated on the specifiedMemoryStack.static floatna(long struct)Unsafe version ofa().static voidna(long struct, float value)Unsafe version ofa.static floatnb(long struct)Unsafe version ofb().static voidnb(long struct, float value)Unsafe version ofb.static floatnc(long struct)Unsafe version ofc().static voidnc(long struct, float value)Unsafe version ofc.static floatnpvx(long struct)Unsafe version ofpvx().static voidnpvx(long struct, float value)Unsafe version ofpvx.static floatnpvy(long struct)Unsafe version ofpvy().static voidnpvy(long struct, float value)Unsafe version ofpvy.static floatnpvz(long struct)Unsafe version ofpvz().static voidnpvz(long struct, float value)Unsafe version ofpvz.static floatnqw(long struct)Unsafe version ofqw().static voidnqw(long struct, float value)Unsafe version ofqw.static floatnqx(long struct)Unsafe version ofqx().static voidnqx(long struct, float value)Unsafe version ofqx.static floatnqy(long struct)Unsafe version ofqy().static voidnqy(long struct, float value)Unsafe version ofqy.static floatnqz(long struct)Unsafe version ofqz().static voidnqz(long struct, float value)Unsafe version ofqz.static floatnsx(long struct)Unsafe version ofsx().static voidnsx(long struct, float value)Unsafe version ofsx.static floatnsy(long struct)Unsafe version ofsy().static voidnsy(long struct, float value)Unsafe version ofsy.static floatnsz(long struct)Unsafe version ofsz().static voidnsz(long struct, float value)Unsafe version ofsz.static floatntx(long struct)Unsafe version oftx().static voidntx(long struct, float value)Unsafe version oftx.static floatnty(long struct)Unsafe version ofty().static voidnty(long struct, float value)Unsafe version ofty.static floatntz(long struct)Unsafe version oftz().static voidntz(long struct, float value)Unsafe version oftz.floatpvx()the x component of the pivot point of the transformVkSRTDataNVpvx(float value)Sets the specified value to thepvx()field.floatpvy()the y component of the pivot point of the transformVkSRTDataNVpvy(float value)Sets the specified value to thepvy()field.floatpvz()the z component of the pivot point of the transformVkSRTDataNVpvz(float value)Sets the specified value to thepvz()field.floatqw()the w component of the rotation quaternionVkSRTDataNVqw(float value)Sets the specified value to theqw()field.floatqx()the x component of the rotation quaternionVkSRTDataNVqx(float value)Sets the specified value to theqx()field.floatqy()the y component of the rotation quaternionVkSRTDataNVqy(float value)Sets the specified value to theqy()field.floatqz()the z component of the rotation quaternionVkSRTDataNVqz(float value)Sets the specified value to theqz()field.VkSRTDataNVset(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.VkSRTDataNVset(VkSRTDataNV src)Copies the specified struct data to this struct.intsizeof()floatsx()the x component of the scale of the transformVkSRTDataNVsx(float value)Sets the specified value to thesx()field.floatsy()the y component of the scale of the transformVkSRTDataNVsy(float value)Sets the specified value to thesy()field.floatsz()the z component of the scale of the transformVkSRTDataNVsz(float value)Sets the specified value to thesz()field.floattx()the x component of the post-rotation translationVkSRTDataNVtx(float value)Sets the specified value to thetx()field.floatty()the y component of the post-rotation translationVkSRTDataNVty(float value)Sets the specified value to thety()field.floattz()the z component of the post-rotation translationVkSRTDataNVtz(float value)Sets the specified value to thetz()field.
-
-
-
Constructor Detail
-
VkSRTDataNV
public VkSRTDataNV(java.nio.ByteBuffer container)
Creates aVkSRTDataNVinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.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 thesx()field.
-
a
public VkSRTDataNV a(float value)
Sets the specified value to thea()field.
-
b
public VkSRTDataNV b(float value)
Sets the specified value to theb()field.
-
pvx
public VkSRTDataNV pvx(float value)
Sets the specified value to thepvx()field.
-
sy
public VkSRTDataNV sy(float value)
Sets the specified value to thesy()field.
-
c
public VkSRTDataNV c(float value)
Sets the specified value to thec()field.
-
pvy
public VkSRTDataNV pvy(float value)
Sets the specified value to thepvy()field.
-
sz
public VkSRTDataNV sz(float value)
Sets the specified value to thesz()field.
-
pvz
public VkSRTDataNV pvz(float value)
Sets the specified value to thepvz()field.
-
qx
public VkSRTDataNV qx(float value)
Sets the specified value to theqx()field.
-
qy
public VkSRTDataNV qy(float value)
Sets the specified value to theqy()field.
-
qz
public VkSRTDataNV qz(float value)
Sets the specified value to theqz()field.
-
qw
public VkSRTDataNV qw(float value)
Sets the specified value to theqw()field.
-
tx
public VkSRTDataNV tx(float value)
Sets the specified value to thetx()field.
-
ty
public VkSRTDataNV ty(float value)
Sets the specified value to thety()field.
-
tz
public VkSRTDataNV tz(float value)
Sets the specified value to thetz()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 newVkSRTDataNVinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkSRTDataNV calloc()
Returns a newVkSRTDataNVinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkSRTDataNV create()
Returns a newVkSRTDataNVinstance allocated withBufferUtils.
-
create
public static VkSRTDataNV create(long address)
Returns a newVkSRTDataNVinstance for the specified memory address.
-
createSafe
@Nullable public static VkSRTDataNV createSafe(long address)
-
malloc
public static VkSRTDataNV.Buffer malloc(int capacity)
Returns a newVkSRTDataNV.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkSRTDataNV.Buffer calloc(int capacity)
Returns a newVkSRTDataNV.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkSRTDataNV.Buffer create(int capacity)
Returns a newVkSRTDataNV.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkSRTDataNV.Buffer create(long address, int capacity)
Create aVkSRTDataNV.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkSRTDataNV.Buffer createSafe(long address, int capacity)
-
malloc
public static VkSRTDataNV malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkSRTDataNVinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkSRTDataNV calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkSRTDataNVinstance allocated on the specifiedMemoryStackand 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 newVkSRTDataNV.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VkSRTDataNV.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkSRTDataNV.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nsx
public static float nsx(long struct)
Unsafe version ofsx().
-
na
public static float na(long struct)
Unsafe version ofa().
-
nb
public static float nb(long struct)
Unsafe version ofb().
-
npvx
public static float npvx(long struct)
Unsafe version ofpvx().
-
nsy
public static float nsy(long struct)
Unsafe version ofsy().
-
nc
public static float nc(long struct)
Unsafe version ofc().
-
npvy
public static float npvy(long struct)
Unsafe version ofpvy().
-
nsz
public static float nsz(long struct)
Unsafe version ofsz().
-
npvz
public static float npvz(long struct)
Unsafe version ofpvz().
-
nqx
public static float nqx(long struct)
Unsafe version ofqx().
-
nqy
public static float nqy(long struct)
Unsafe version ofqy().
-
nqz
public static float nqz(long struct)
Unsafe version ofqz().
-
nqw
public static float nqw(long struct)
Unsafe version ofqw().
-
ntx
public static float ntx(long struct)
Unsafe version oftx().
-
nty
public static float nty(long struct)
Unsafe version ofty().
-
ntz
public static float ntz(long struct)
Unsafe version oftz().
-
nsx
public static void nsx(long struct, float value)Unsafe version ofsx.
-
na
public static void na(long struct, float value)Unsafe version ofa.
-
nb
public static void nb(long struct, float value)Unsafe version ofb.
-
npvx
public static void npvx(long struct, float value)Unsafe version ofpvx.
-
nsy
public static void nsy(long struct, float value)Unsafe version ofsy.
-
nc
public static void nc(long struct, float value)Unsafe version ofc.
-
npvy
public static void npvy(long struct, float value)Unsafe version ofpvy.
-
nsz
public static void nsz(long struct, float value)Unsafe version ofsz.
-
npvz
public static void npvz(long struct, float value)Unsafe version ofpvz.
-
nqx
public static void nqx(long struct, float value)Unsafe version ofqx.
-
nqy
public static void nqy(long struct, float value)Unsafe version ofqy.
-
nqz
public static void nqz(long struct, float value)Unsafe version ofqz.
-
nqw
public static void nqw(long struct, float value)Unsafe version ofqw.
-
ntx
public static void ntx(long struct, float value)Unsafe version oftx.
-
nty
public static void nty(long struct, float value)Unsafe version ofty.
-
ntz
public static void ntz(long struct, float value)Unsafe version oftz.
-
-