Package org.lwjgl.vulkan
Class VkSRTDataNV
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkSRTDataNV>
org.lwjgl.vulkan.VkSRTDataNV
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkSRTDataNV
extends org.lwjgl.system.Struct<VkSRTDataNV>
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 =
| 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 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 =
| 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
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 ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct member offsets.static final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionVkSRTDataNV(ByteBuffer container) Creates aVkSRTDataNVinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionfloata()one component of the shear for the transforma(float value) Sets the specified value to thea()field.floatb()one component of the shear for the transformb(float value) Sets the specified value to theb()field.floatc()one component of the shear for the transformc(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 @Nullable VkSRTDataNVcreateSafe(long address) static @Nullable 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 transformpvx(float value) Sets the specified value to thepvx()field.floatpvy()the y component of the pivot point of the transformpvy(float value) Sets the specified value to thepvy()field.floatpvz()the z component of the pivot point of the transformpvz(float value) Sets the specified value to thepvz()field.floatqw()the w component of the rotation quaternionqw(float value) Sets the specified value to theqw()field.floatqx()the x component of the rotation quaternionqx(float value) Sets the specified value to theqx()field.floatqy()the y component of the rotation quaternionqy(float value) Sets the specified value to theqy()field.floatqz()the z component of the rotation quaternionqz(float value) Sets the specified value to theqz()field.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(VkSRTDataNV src) Copies the specified struct data to this struct.intsizeof()floatsx()the x component of the scale of the transformsx(float value) Sets the specified value to thesx()field.floatsy()the y component of the scale of the transformsy(float value) Sets the specified value to thesy()field.floatsz()the z component of the scale of the transformsz(float value) Sets the specified value to thesz()field.floattx()the x component of the post-rotation translationtx(float value) Sets the specified value to thetx()field.floatty()the y component of the post-rotation translationty(float value) Sets the specified value to thety()field.floattz()the z component of the post-rotation translationtz(float value) Sets the specified value to thetz()field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
SX
public static final int SXThe struct member offsets. -
A
public static final int AThe struct member offsets. -
B
public static final int BThe struct member offsets. -
PVX
public static final int PVXThe struct member offsets. -
SY
public static final int SYThe struct member offsets. -
C
public static final int CThe struct member offsets. -
PVY
public static final int PVYThe struct member offsets. -
SZ
public static final int SZThe struct member offsets. -
PVZ
public static final int PVZThe struct member offsets. -
QX
public static final int QXThe struct member offsets. -
QY
public static final int QYThe struct member offsets. -
QZ
public static final int QZThe struct member offsets. -
QW
public static final int QWThe struct member offsets. -
TX
public static final int TXThe struct member offsets. -
TY
public static final int TYThe struct member offsets. -
TZ
public static final int TZThe struct member offsets.
-
-
Constructor Details
-
VkSRTDataNV
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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<VkSRTDataNV>
-
sx
public float sx()the x component of the scale of the transform -
a
public float a()one component of the shear for the transform -
b
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
Sets the specified value to thesx()field. -
a
Sets the specified value to thea()field. -
b
Sets the specified value to theb()field. -
pvx
Sets the specified value to thepvx()field. -
sy
Sets the specified value to thesy()field. -
c
Sets the specified value to thec()field. -
pvy
Sets the specified value to thepvy()field. -
sz
Sets the specified value to thesz()field. -
pvz
Sets the specified value to thepvz()field. -
qx
Sets the specified value to theqx()field. -
qy
Sets the specified value to theqy()field. -
qz
Sets the specified value to theqz()field. -
qw
Sets the specified value to theqw()field. -
tx
Sets the specified value to thetx()field. -
ty
Sets the specified value to thety()field. -
tz
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
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newVkSRTDataNVinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkSRTDataNVinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkSRTDataNVinstance allocated withBufferUtils. -
create
Returns a newVkSRTDataNVinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkSRTDataNV.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkSRTDataNV.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkSRTDataNV.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkSRTDataNV.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newVkSRTDataNVinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVkSRTDataNVinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newVkSRTDataNV.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newVkSRTDataNV.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
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.
-