Package org.lwjgl.openxr
Class XrVector3f
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openxr.XrVector3f
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class XrVector3f extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceThree-dimensional vector.Description
If used to represent physical distances (rather than e.g. velocity or angular velocity) and not otherwise specified, values must be in meters.
See Also
XrCompositionLayerReprojectionPlaneOverrideMSFT,XrGeometryInstanceCreateInfoFB,XrGeometryInstanceTransformFB,XrHandCapsuleFB,XrHandJointVelocityEXT,XrHandMeshVertexMSFT,XrHandTrackingMeshFB,XrKeyboardTrackingDescriptionFB,XrPosef,XrQuaternionf,XrSceneMeshVertexBufferMSFT,XrSceneOrientedBoxBoundMSFT,XrSceneSphereBoundMSFT,XrSpaceVelocity,XrTriangleMeshCreateInfoFB,XrVector2f,XrVector4f,TriangleMeshGetVertexBufferFBLayout
struct XrVector3f { floatx(); floaty(); floatz(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXrVector3f.BufferAn array ofXrVector3fstructs.
-
Constructor Summary
Constructors Constructor Description XrVector3f(java.nio.ByteBuffer container)Creates aXrVector3finstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static XrVector3fcalloc()Returns a newXrVector3finstance allocated withmemCalloc.static XrVector3f.Buffercalloc(int capacity)Returns a newXrVector3f.Bufferinstance allocated withmemCalloc.static XrVector3f.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrVector3f.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrVector3fcalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrVector3finstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrVector3fcreate()Returns a newXrVector3finstance allocated withBufferUtils.static XrVector3f.Buffercreate(int capacity)Returns a newXrVector3f.Bufferinstance allocated withBufferUtils.static XrVector3fcreate(long address)Returns a newXrVector3finstance for the specified memory address.static XrVector3f.Buffercreate(long address, int capacity)Create aXrVector3f.Bufferinstance at the specified memory.static XrVector3fcreateSafe(long address)static XrVector3f.BuffercreateSafe(long address, int capacity)static XrVector3fmalloc()Returns a newXrVector3finstance allocated withmemAlloc.static XrVector3f.Buffermalloc(int capacity)Returns a newXrVector3f.Bufferinstance allocated withmemAlloc.static XrVector3f.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrVector3f.Bufferinstance allocated on the specifiedMemoryStack.static XrVector3fmalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrVector3finstance allocated on the specifiedMemoryStack.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.XrVector3fset(float x, float y, float z)Initializes this struct with the specified values.XrVector3fset(XrVector3f src)Copies the specified struct data to this struct.intsizeof()floatx()the x coordinate of the vector.XrVector3fx(float value)Sets the specified value to thex()field.floaty()the y coordinate of the vector.XrVector3fy(float value)Sets the specified value to they()field.floatz()the z coordinate of the vector.XrVector3fz(float value)Sets the specified value to thez()field.
-
-
-
Constructor Detail
-
XrVector3f
public XrVector3f(java.nio.ByteBuffer container)
Creates aXrVector3finstance 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.
-
x
public XrVector3f x(float value)
Sets the specified value to thex()field.
-
y
public XrVector3f y(float value)
Sets the specified value to they()field.
-
z
public XrVector3f z(float value)
Sets the specified value to thez()field.
-
set
public XrVector3f set(float x, float y, float z)
Initializes this struct with the specified values.
-
set
public XrVector3f set(XrVector3f src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static XrVector3f malloc()
Returns a newXrVector3finstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static XrVector3f calloc()
Returns a newXrVector3finstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static XrVector3f create()
Returns a newXrVector3finstance allocated withBufferUtils.
-
create
public static XrVector3f create(long address)
Returns a newXrVector3finstance for the specified memory address.
-
createSafe
@Nullable public static XrVector3f createSafe(long address)
-
malloc
public static XrVector3f.Buffer malloc(int capacity)
Returns a newXrVector3f.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static XrVector3f.Buffer calloc(int capacity)
Returns a newXrVector3f.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static XrVector3f.Buffer create(int capacity)
Returns a newXrVector3f.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static XrVector3f.Buffer create(long address, int capacity)
Create aXrVector3f.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static XrVector3f.Buffer createSafe(long address, int capacity)
-
malloc
public static XrVector3f malloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrVector3finstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static XrVector3f calloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrVector3finstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static XrVector3f.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrVector3f.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static XrVector3f.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrVector3f.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().
-
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.
-
-