Top Description Inners Fields Constructors Methods
org.lwjgl.openxr

public Class XrSpaceVelocity

extends Struct<XrSpaceVelocity>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Contains info about a space.
Valid Usage (Implicit)
See Also

XrSpaceLocation, XrVector3f, LocateSpace

Layout


struct XrSpaceVelocity {
    XrStructureType type;
    void * next;
    XrSpaceVelocityFlags velocityFlags;
    XrVector3f linearVelocity;
    XrVector3f angularVelocity;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
ANGULARVELOCITY

The struct member offsets.

public static final int
LINEARVELOCITY

The struct member offsets.

public static final int
NEXT

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
TYPE

The struct member offsets.

public static final int
VELOCITYFLAGS

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
XrSpaceVelocity(long address, ByteBuffer container)

public
XrSpaceVelocity(ByteBuffer container)

Creates a XrSpaceVelocity instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public XrVector3f
angularVelocity()

the relative angular velocity of LocateSpace::space with respect to LocateSpace::baseSpace.

public XrSpaceVelocity
angularVelocity(XrVector3f value)

Copies the specified XrVector3f to the angularVelocity field.

public XrSpaceVelocity
angularVelocity(Consumer<XrVector3f> consumer)

Passes the angularVelocity field to the specified Consumer.

public static XrSpaceVelocity
calloc()

Returns a new XrSpaceVelocity instance allocated with memCalloc.

public static XrSpaceVelocity.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new XrSpaceVelocity.Buffer instance allocated with memCalloc.

public static XrSpaceVelocity
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new XrSpaceVelocity instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static XrSpaceVelocity.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new XrSpaceVelocity.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

protected XrSpaceVelocity
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static XrSpaceVelocity
create()

Returns a new XrSpaceVelocity instance allocated with BufferUtils.

public static XrSpaceVelocity
create(long address)

Returns a new XrSpaceVelocity instance for the specified memory address.

public static XrSpaceVelocity.Buffer
create(int
the buffer capacity
capacity
)

Returns a new XrSpaceVelocity.Buffer instance allocated with BufferUtils.

public static XrSpaceVelocity.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a XrSpaceVelocity.Buffer instance at the specified memory.

public static XrSpaceVelocity
createSafe(long address)

Like create, but returns null if address is NULL.

public static XrSpaceVelocity.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public XrVector3f
linearVelocity()

the relative linear velocity of the origin of LocateSpace::space with respect to and expressed in the reference frame of LocateSpace::baseSpace, in units of meters per second.

public XrSpaceVelocity
linearVelocity(XrVector3f value)

Copies the specified XrVector3f to the linearVelocity field.

public XrSpaceVelocity
linearVelocity(Consumer<XrVector3f> consumer)

Passes the linearVelocity field to the specified Consumer.

public static XrSpaceVelocity
malloc()

Returns a new XrSpaceVelocity instance allocated with memAlloc.

public static XrSpaceVelocity.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new XrSpaceVelocity.Buffer instance allocated with memAlloc.

public static XrSpaceVelocity
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new XrSpaceVelocity instance allocated on the specified MemoryStack.

public static XrSpaceVelocity.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new XrSpaceVelocity.Buffer instance allocated on the specified MemoryStack.

public static XrVector3f
nangularVelocity(long struct)

Unsafe version of angularVelocity.

public static void
nangularVelocity(long struct, XrVector3f value)

Unsafe version of angularVelocity.

public long
next()

NULL or a pointer to the next structure in a structure chain.

public XrSpaceVelocity
next(long value)

Sets the specified value to the next field.

public static XrVector3f
nlinearVelocity(long struct)

Unsafe version of linearVelocity.

public static void
nlinearVelocity(long struct, XrVector3f value)

Unsafe version of linearVelocity.

public static long
nnext(long struct)

Unsafe version of next.

public static void
nnext(long struct, long value)

Unsafe version of next.

public static int
ntype(long struct)

Unsafe version of type.

public static void
ntype(long struct, int value)

Unsafe version of type.

public static long
nvelocityFlags(long struct)

Unsafe version of velocityFlags.

public static void
nvelocityFlags(long struct, long value)

Unsafe version of velocityFlags.

public XrSpaceVelocity
set(int type, long next, long velocityFlags, XrVector3f linearVelocity, XrVector3f angularVelocity)

Initializes this struct with the specified values.

public XrSpaceVelocity

Returns:

this struct
set
(XrSpaceVelocity
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public int
type()

the XrStructureType of this structure.

public XrSpaceVelocity
type(int value)

Sets the specified value to the type field.

public XrSpaceVelocity
type$Default()

Sets the TYPE_SPACE_VELOCITY value to the type field.

public long
velocityFlags()

a bitfield, with bit masks defined in XrSpaceVelocityFlagBits, to indicate which members contain valid data.

public XrSpaceVelocity
velocityFlags(long value)

Sets the specified value to the velocityFlags field.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

ANGULARVELOCITYback to summary
public static final int ANGULARVELOCITY

The struct member offsets.

LINEARVELOCITYback to summary
public static final int LINEARVELOCITY

The struct member offsets.

NEXTback to summary
public static final int NEXT

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

TYPEback to summary
public static final int TYPE

The struct member offsets.

VELOCITYFLAGSback to summary
public static final int VELOCITYFLAGS

The struct member offsets.

Constructor Detail

XrSpaceVelocityback to summary
protected XrSpaceVelocity(long address, ByteBuffer container)
XrSpaceVelocityback to summary
public XrSpaceVelocity(ByteBuffer container)

Creates a XrSpaceVelocity 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

angularVelocityback to summary
public XrVector3f angularVelocity()

the relative angular velocity of LocateSpace::space with respect to LocateSpace::baseSpace. The vector’s direction is expressed in the reference frame of LocateSpace::baseSpace and is parallel to the rotational axis of LocateSpace::space. The vector’s magnitude is the relative angular speed of LocateSpace::space in radians per second. The vector follows the right-hand rule for torque/rotation.

angularVelocityback to summary
public XrSpaceVelocity angularVelocity(XrVector3f value)

Copies the specified XrVector3f to the angularVelocity field.

angularVelocityback to summary
public XrSpaceVelocity angularVelocity(Consumer<XrVector3f> consumer)

Passes the angularVelocity field to the specified Consumer.

callocback to summary
public static XrSpaceVelocity calloc()

Returns a new XrSpaceVelocity instance allocated with memCalloc. The instance must be explicitly freed.

callocback to summary
public static XrSpaceVelocity.Buffer calloc(int capacity)

Returns a new XrSpaceVelocity.Buffer instance allocated with memCalloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

callocback to summary
public static XrSpaceVelocity calloc(MemoryStack stack)

Returns a new XrSpaceVelocity instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
stack:MemoryStack

the stack from which to allocate

callocback to summary
public static XrSpaceVelocity.Buffer calloc(int capacity, MemoryStack stack)

Returns a new XrSpaceVelocity.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

createback to summary
protected XrSpaceVelocity create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static XrSpaceVelocity create()

Returns a new XrSpaceVelocity instance allocated with BufferUtils.

createback to summary
public static XrSpaceVelocity create(long address)

Returns a new XrSpaceVelocity instance for the specified memory address.

createback to summary
public static XrSpaceVelocity.Buffer create(int capacity)

Returns a new XrSpaceVelocity.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

createback to summary
public static XrSpaceVelocity.Buffer create(long address, int capacity)

Create a XrSpaceVelocity.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static XrSpaceVelocity createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static XrSpaceVelocity.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
linearVelocityback to summary
public XrVector3f linearVelocity()

the relative linear velocity of the origin of LocateSpace::space with respect to and expressed in the reference frame of LocateSpace::baseSpace, in units of meters per second.

linearVelocityback to summary
public XrSpaceVelocity linearVelocity(XrVector3f value)

Copies the specified XrVector3f to the linearVelocity field.

linearVelocityback to summary
public XrSpaceVelocity linearVelocity(Consumer<XrVector3f> consumer)

Passes the linearVelocity field to the specified Consumer.

mallocback to summary
public static XrSpaceVelocity malloc()

Returns a new XrSpaceVelocity instance allocated with memAlloc. The instance must be explicitly freed.

mallocback to summary
public static XrSpaceVelocity.Buffer malloc(int capacity)

Returns a new XrSpaceVelocity.Buffer instance allocated with memAlloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static XrSpaceVelocity malloc(MemoryStack stack)

Returns a new XrSpaceVelocity instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocback to summary
public static XrSpaceVelocity.Buffer malloc(int capacity, MemoryStack stack)

Returns a new XrSpaceVelocity.Buffer instance allocated on the specified MemoryStack.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

nangularVelocityback to summary
public static XrVector3f nangularVelocity(long struct)

Unsafe version of angularVelocity.

nangularVelocityback to summary
public static void nangularVelocity(long struct, XrVector3f value)

Unsafe version of angularVelocity.

nextback to summary
public long next()

NULL or a pointer to the next structure in a structure chain. No such structures are defined in core OpenXR.

Annotations
@NativeType:void *
nextback to summary
public XrSpaceVelocity next(long value)

Sets the specified value to the next field.

nlinearVelocityback to summary
public static XrVector3f nlinearVelocity(long struct)

Unsafe version of linearVelocity.

nlinearVelocityback to summary
public static void nlinearVelocity(long struct, XrVector3f value)

Unsafe version of linearVelocity.

nnextback to summary
public static long nnext(long struct)

Unsafe version of next.

nnextback to summary
public static void nnext(long struct, long value)

Unsafe version of next.

ntypeback to summary
public static int ntype(long struct)

Unsafe version of type.

ntypeback to summary
public static void ntype(long struct, int value)

Unsafe version of type.

nvelocityFlagsback to summary
public static long nvelocityFlags(long struct)

Unsafe version of velocityFlags.

nvelocityFlagsback to summary
public static void nvelocityFlags(long struct, long value)

Unsafe version of velocityFlags.

setback to summary
public XrSpaceVelocity set(int type, long next, long velocityFlags, XrVector3f linearVelocity, XrVector3f angularVelocity)

Initializes this struct with the specified values.

setback to summary
public XrSpaceVelocity set(XrSpaceVelocity src)

Copies the specified struct data to this struct.

Parameters
src:XrSpaceVelocity

the source struct

Returns:XrSpaceVelocity

this struct

sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
typeback to summary
public int type()

the XrStructureType of this structure.

Annotations
@NativeType:XrStructureType
typeback to summary
public XrSpaceVelocity type(int value)

Sets the specified value to the type field.

type$Defaultback to summary
public XrSpaceVelocity type$Default()

Sets the TYPE_SPACE_VELOCITY value to the type field.

velocityFlagsback to summary
public long velocityFlags()

a bitfield, with bit masks defined in XrSpaceVelocityFlagBits, to indicate which members contain valid data. If none of the bits are set, no other fields in this structure should be considered to be valid or meaningful.

Annotations
@NativeType:XrSpaceVelocityFlags
velocityFlagsback to summary
public XrSpaceVelocity velocityFlags(long value)

Sets the specified value to the velocityFlags field.

org.lwjgl.openxr back to summary

public Class XrSpaceVelocity.Buffer

extends StructBuffer<XrSpaceVelocity, XrSpaceVelocity.Buffer>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable

An array of XrSpaceVelocity structs.

Field Summary

Modifier and TypeField and Description
private static final XrSpaceVelocity

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new XrSpaceVelocity.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
public XrVector3f
public XrSpaceVelocity.Buffer
angularVelocity(XrVector3f value)

Copies the specified XrVector3f to the XrSpaceVelocity#angularVelocity field.

public XrSpaceVelocity.Buffer
angularVelocity(Consumer<XrVector3f> consumer)

Passes the XrSpaceVelocity#angularVelocity field to the specified Consumer.

protected XrSpaceVelocity
public XrVector3f
public XrSpaceVelocity.Buffer
linearVelocity(XrVector3f value)

Copies the specified XrVector3f to the XrSpaceVelocity#linearVelocity field.

public XrSpaceVelocity.Buffer
linearVelocity(Consumer<XrVector3f> consumer)

Passes the XrSpaceVelocity#linearVelocity field to the specified Consumer.

public long

Returns:

the value of the XrSpaceVelocity#next field.
next
()

public XrSpaceVelocity.Buffer
next(long value)

Sets the specified value to the XrSpaceVelocity#next field.

protected XrSpaceVelocity.Buffer
public int

Returns:

the value of the XrSpaceVelocity#type field.
type
()

public XrSpaceVelocity.Buffer
type(int value)

Sets the specified value to the XrSpaceVelocity#type field.

public XrSpaceVelocity.Buffer
public long

Returns:

the value of the XrSpaceVelocity#velocityFlags field.
velocityFlags
()

public XrSpaceVelocity.Buffer
velocityFlags(long value)

Sets the specified value to the XrSpaceVelocity#velocityFlags field.

Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final XrSpaceVelocity ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new XrSpaceVelocity.Buffer instance backed by the specified container.

Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by XrSpaceVelocity#SIZEOF, and its mark will be undefined.

The created buffer instance holds a strong reference to the container object.

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

angularVelocityback to summary
public XrVector3f angularVelocity()
Returns:XrVector3f

a XrVector3f view of the XrSpaceVelocity#angularVelocity field.

angularVelocityback to summary
public XrSpaceVelocity.Buffer angularVelocity(XrVector3f value)

Copies the specified XrVector3f to the XrSpaceVelocity#angularVelocity field.

angularVelocityback to summary
public XrSpaceVelocity.Buffer angularVelocity(Consumer<XrVector3f> consumer)

Passes the XrSpaceVelocity#angularVelocity field to the specified Consumer.

getElementFactoryback to summary
protected XrSpaceVelocity getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
linearVelocityback to summary
public XrVector3f linearVelocity()
Returns:XrVector3f

a XrVector3f view of the XrSpaceVelocity#linearVelocity field.

linearVelocityback to summary
public XrSpaceVelocity.Buffer linearVelocity(XrVector3f value)

Copies the specified XrVector3f to the XrSpaceVelocity#linearVelocity field.

linearVelocityback to summary
public XrSpaceVelocity.Buffer linearVelocity(Consumer<XrVector3f> consumer)

Passes the XrSpaceVelocity#linearVelocity field to the specified Consumer.

nextback to summary
public long next()
Returns:long

the value of the XrSpaceVelocity#next field.

Annotations
@NativeType:void *
nextback to summary
public XrSpaceVelocity.Buffer next(long value)

Sets the specified value to the XrSpaceVelocity#next field.

selfback to summary
protected XrSpaceVelocity.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override
typeback to summary
public int type()
Returns:int

the value of the XrSpaceVelocity#type field.

Annotations
@NativeType:XrStructureType
typeback to summary
public XrSpaceVelocity.Buffer type(int value)

Sets the specified value to the XrSpaceVelocity#type field.

type$Defaultback to summary
public XrSpaceVelocity.Buffer type$Default()

Sets the TYPE_SPACE_VELOCITY value to the XrSpaceVelocity#type field.

velocityFlagsback to summary
public long velocityFlags()
Returns:long

the value of the XrSpaceVelocity#velocityFlags field.

Annotations
@NativeType:XrSpaceVelocityFlags
velocityFlagsback to summary
public XrSpaceVelocity.Buffer velocityFlags(long value)

Sets the specified value to the XrSpaceVelocity#velocityFlags field.