Package org.lwjgl.openxr
Class XrQuaternionf
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openxr.XrQuaternionf
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class XrQuaternionf extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceUnit Quaternion.See Also
XrCompositionLayerCubeKHR,XrPosef,XrVector2f,XrVector3f,XrVector4fLayout
struct XrQuaternionf { floatx(); floaty(); floatz(); floatw(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXrQuaternionf.BufferAn array ofXrQuaternionfstructs.
-
Constructor Summary
Constructors Constructor Description XrQuaternionf(java.nio.ByteBuffer container)Creates aXrQuaternionfinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static XrQuaternionfcalloc()Returns a newXrQuaternionfinstance allocated withmemCalloc.static XrQuaternionf.Buffercalloc(int capacity)Returns a newXrQuaternionf.Bufferinstance allocated withmemCalloc.static XrQuaternionf.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrQuaternionf.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrQuaternionfcalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrQuaternionfinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrQuaternionfcreate()Returns a newXrQuaternionfinstance allocated withBufferUtils.static XrQuaternionf.Buffercreate(int capacity)Returns a newXrQuaternionf.Bufferinstance allocated withBufferUtils.static XrQuaternionfcreate(long address)Returns a newXrQuaternionfinstance for the specified memory address.static XrQuaternionf.Buffercreate(long address, int capacity)Create aXrQuaternionf.Bufferinstance at the specified memory.static XrQuaternionfcreateSafe(long address)static XrQuaternionf.BuffercreateSafe(long address, int capacity)static XrQuaternionfmalloc()Returns a newXrQuaternionfinstance allocated withmemAlloc.static XrQuaternionf.Buffermalloc(int capacity)Returns a newXrQuaternionf.Bufferinstance allocated withmemAlloc.static XrQuaternionf.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrQuaternionf.Bufferinstance allocated on the specifiedMemoryStack.static XrQuaternionfmalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrQuaternionfinstance allocated on the specifiedMemoryStack.static floatnw(long struct)Unsafe version ofw().static voidnw(long struct, float value)Unsafe version ofw.static floatnx(long struct)Unsafe version ofx().static voidnx(long struct, float value)Unsafe version ofx.static floatny(long struct)Unsafe version ofy().static voidny(long struct, float value)Unsafe version ofy.static floatnz(long struct)Unsafe version ofz().static voidnz(long struct, float value)Unsafe version ofz.XrQuaternionfset(float x, float y, float z, float w)Initializes this struct with the specified values.XrQuaternionfset(XrQuaternionf src)Copies the specified struct data to this struct.intsizeof()floatw()the w coordinate of the quaternion.XrQuaternionfw(float value)Sets the specified value to thew()field.floatx()the x coordinate of the quaternion.XrQuaternionfx(float value)Sets the specified value to thex()field.floaty()the y coordinate of the quaternion.XrQuaternionfy(float value)Sets the specified value to they()field.floatz()the z coordinate of the quaternion.XrQuaternionfz(float value)Sets the specified value to thez()field.
-
-
-
Constructor Detail
-
XrQuaternionf
public XrQuaternionf(java.nio.ByteBuffer container)
Creates aXrQuaternionfinstance 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
-
x
public float x()
the x coordinate of the quaternion.
-
y
public float y()
the y coordinate of the quaternion.
-
z
public float z()
the z coordinate of the quaternion.
-
w
public float w()
the w coordinate of the quaternion.
-
x
public XrQuaternionf x(float value)
Sets the specified value to thex()field.
-
y
public XrQuaternionf y(float value)
Sets the specified value to they()field.
-
z
public XrQuaternionf z(float value)
Sets the specified value to thez()field.
-
w
public XrQuaternionf w(float value)
Sets the specified value to thew()field.
-
set
public XrQuaternionf set(float x, float y, float z, float w)
Initializes this struct with the specified values.
-
set
public XrQuaternionf set(XrQuaternionf src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static XrQuaternionf malloc()
Returns a newXrQuaternionfinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static XrQuaternionf calloc()
Returns a newXrQuaternionfinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static XrQuaternionf create()
Returns a newXrQuaternionfinstance allocated withBufferUtils.
-
create
public static XrQuaternionf create(long address)
Returns a newXrQuaternionfinstance for the specified memory address.
-
createSafe
@Nullable public static XrQuaternionf createSafe(long address)
-
malloc
public static XrQuaternionf.Buffer malloc(int capacity)
Returns a newXrQuaternionf.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static XrQuaternionf.Buffer calloc(int capacity)
Returns a newXrQuaternionf.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static XrQuaternionf.Buffer create(int capacity)
Returns a newXrQuaternionf.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static XrQuaternionf.Buffer create(long address, int capacity)
Create aXrQuaternionf.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static XrQuaternionf.Buffer createSafe(long address, int capacity)
-
malloc
public static XrQuaternionf malloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrQuaternionfinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static XrQuaternionf calloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrQuaternionfinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static XrQuaternionf.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrQuaternionf.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static XrQuaternionf.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrQuaternionf.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nx
public static float nx(long struct)
Unsafe version ofx().
-
ny
public static float ny(long struct)
Unsafe version ofy().
-
nz
public static float nz(long struct)
Unsafe version ofz().
-
nw
public static float nw(long struct)
Unsafe version ofw().
-
nx
public static void nx(long struct, float value)Unsafe version ofx.
-
ny
public static void ny(long struct, float value)Unsafe version ofy.
-
nz
public static void nz(long struct, float value)Unsafe version ofz.
-
nw
public static void nw(long struct, float value)Unsafe version ofw.
-
-