Package org.lwjgl.openxr
Class XrVector4f
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openxr.XrVector4f
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class XrVector4f extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceFour-dimensional vector.Description
If used to represent physical distances,
x,y, andzvalues must be in meters.See Also
XrHandTrackingMeshFB,XrPosef,XrQuaternionf,XrVector2f,XrVector3fLayout
struct XrVector4f { floatx(); floaty(); floatz(); floatw(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXrVector4f.BufferAn array ofXrVector4fstructs.
-
Constructor Summary
Constructors Constructor Description XrVector4f(java.nio.ByteBuffer container)Creates aXrVector4finstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static XrVector4fcalloc()Returns a newXrVector4finstance allocated withmemCalloc.static XrVector4f.Buffercalloc(int capacity)Returns a newXrVector4f.Bufferinstance allocated withmemCalloc.static XrVector4f.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrVector4f.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrVector4fcalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrVector4finstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrVector4fcreate()Returns a newXrVector4finstance allocated withBufferUtils.static XrVector4f.Buffercreate(int capacity)Returns a newXrVector4f.Bufferinstance allocated withBufferUtils.static XrVector4fcreate(long address)Returns a newXrVector4finstance for the specified memory address.static XrVector4f.Buffercreate(long address, int capacity)Create aXrVector4f.Bufferinstance at the specified memory.static XrVector4fcreateSafe(long address)static XrVector4f.BuffercreateSafe(long address, int capacity)static XrVector4fmalloc()Returns a newXrVector4finstance allocated withmemAlloc.static XrVector4f.Buffermalloc(int capacity)Returns a newXrVector4f.Bufferinstance allocated withmemAlloc.static XrVector4f.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrVector4f.Bufferinstance allocated on the specifiedMemoryStack.static XrVector4fmalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrVector4finstance 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.XrVector4fset(float x, float y, float z, float w)Initializes this struct with the specified values.XrVector4fset(XrVector4f src)Copies the specified struct data to this struct.intsizeof()floatw()the w coordinate of the vector.XrVector4fw(float value)Sets the specified value to thew()field.floatx()the x coordinate of the vector.XrVector4fx(float value)Sets the specified value to thex()field.floaty()the y coordinate of the vector.XrVector4fy(float value)Sets the specified value to they()field.floatz()the z coordinate of the vector.XrVector4fz(float value)Sets the specified value to thez()field.
-
-
-
Constructor Detail
-
XrVector4f
public XrVector4f(java.nio.ByteBuffer container)
Creates aXrVector4finstance 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 vector.
-
y
public float y()
the y coordinate of the vector.
-
z
public float z()
the z coordinate of the vector.
-
w
public float w()
the w coordinate of the vector.
-
x
public XrVector4f x(float value)
Sets the specified value to thex()field.
-
y
public XrVector4f y(float value)
Sets the specified value to they()field.
-
z
public XrVector4f z(float value)
Sets the specified value to thez()field.
-
w
public XrVector4f w(float value)
Sets the specified value to thew()field.
-
set
public XrVector4f set(float x, float y, float z, float w)
Initializes this struct with the specified values.
-
set
public XrVector4f set(XrVector4f src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static XrVector4f malloc()
Returns a newXrVector4finstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static XrVector4f calloc()
Returns a newXrVector4finstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static XrVector4f create()
Returns a newXrVector4finstance allocated withBufferUtils.
-
create
public static XrVector4f create(long address)
Returns a newXrVector4finstance for the specified memory address.
-
createSafe
@Nullable public static XrVector4f createSafe(long address)
-
malloc
public static XrVector4f.Buffer malloc(int capacity)
Returns a newXrVector4f.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static XrVector4f.Buffer calloc(int capacity)
Returns a newXrVector4f.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static XrVector4f.Buffer create(int capacity)
Returns a newXrVector4f.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static XrVector4f.Buffer create(long address, int capacity)
Create aXrVector4f.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static XrVector4f.Buffer createSafe(long address, int capacity)
-
malloc
public static XrVector4f malloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrVector4finstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static XrVector4f calloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrVector4finstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static XrVector4f.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrVector4f.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static XrVector4f.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrVector4f.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.
-
-