Package org.lwjgl.openvr
Class HmdVector3
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openvr.HmdVector3
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class HmdVector3 extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Layout
struct HmdVector3_t { float v[3]; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HmdVector3.Buffer
An array ofHmdVector3
structs.
-
Constructor Summary
Constructors Constructor Description HmdVector3(java.nio.ByteBuffer container)
Creates aHmdVector3
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HmdVector3
calloc()
Returns a newHmdVector3
instance allocated withmemCalloc
.static HmdVector3.Buffer
calloc(int capacity)
Returns a newHmdVector3.Buffer
instance allocated withmemCalloc
.static HmdVector3
callocStack()
Returns a newHmdVector3
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static HmdVector3.Buffer
callocStack(int capacity)
Returns a newHmdVector3.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static HmdVector3.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newHmdVector3.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static HmdVector3
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newHmdVector3
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static HmdVector3
create()
Returns a newHmdVector3
instance allocated withBufferUtils
.static HmdVector3.Buffer
create(int capacity)
Returns a newHmdVector3.Buffer
instance allocated withBufferUtils
.static HmdVector3
create(long address)
Returns a newHmdVector3
instance for the specified memory address.static HmdVector3.Buffer
create(long address, int capacity)
Create aHmdVector3.Buffer
instance at the specified memory.static HmdVector3
createSafe(long address)
static HmdVector3.Buffer
createSafe(long address, int capacity)
static HmdVector3
malloc()
Returns a newHmdVector3
instance allocated withmemAlloc
.static HmdVector3.Buffer
malloc(int capacity)
Returns a newHmdVector3.Buffer
instance allocated withmemAlloc
.static HmdVector3
mallocStack()
Returns a newHmdVector3
instance allocated on the thread-localMemoryStack
.static HmdVector3.Buffer
mallocStack(int capacity)
Returns a newHmdVector3.Buffer
instance allocated on the thread-localMemoryStack
.static HmdVector3.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newHmdVector3.Buffer
instance allocated on the specifiedMemoryStack
.static HmdVector3
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newHmdVector3
instance allocated on the specifiedMemoryStack
.static java.nio.FloatBuffer
nv(long struct)
Unsafe version ofv()
.static float
nv(long struct, int index)
Unsafe version ofv
.static void
nv(long struct, int index, float value)
Unsafe version ofv
.static void
nv(long struct, java.nio.FloatBuffer value)
Unsafe version ofv
.HmdVector3
set(HmdVector3 src)
Copies the specified struct data to this struct.int
sizeof()
java.nio.FloatBuffer
v()
Returns aFloatBuffer
view of thev
field.float
v(int index)
Returns the value at the specified index of thev
field.HmdVector3
v(int index, float value)
Sets the specified value at the specified index of thev
field.HmdVector3
v(java.nio.FloatBuffer value)
Copies the specifiedFloatBuffer
to thev
field.
-
-
-
Constructor Detail
-
HmdVector3
public HmdVector3(java.nio.ByteBuffer container)
Creates aHmdVector3
instance at the current position of the specifiedByteBuffer
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
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
v
public java.nio.FloatBuffer v()
Returns aFloatBuffer
view of thev
field.
-
v
public float v(int index)
Returns the value at the specified index of thev
field.
-
v
public HmdVector3 v(java.nio.FloatBuffer value)
Copies the specifiedFloatBuffer
to thev
field.
-
v
public HmdVector3 v(int index, float value)
Sets the specified value at the specified index of thev
field.
-
set
public HmdVector3 set(HmdVector3 src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static HmdVector3 malloc()
Returns a newHmdVector3
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static HmdVector3 calloc()
Returns a newHmdVector3
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static HmdVector3 create()
Returns a newHmdVector3
instance allocated withBufferUtils
.
-
create
public static HmdVector3 create(long address)
Returns a newHmdVector3
instance for the specified memory address.
-
createSafe
@Nullable public static HmdVector3 createSafe(long address)
-
malloc
public static HmdVector3.Buffer malloc(int capacity)
Returns a newHmdVector3.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static HmdVector3.Buffer calloc(int capacity)
Returns a newHmdVector3.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static HmdVector3.Buffer create(int capacity)
Returns a newHmdVector3.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static HmdVector3.Buffer create(long address, int capacity)
Create aHmdVector3.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static HmdVector3.Buffer createSafe(long address, int capacity)
-
mallocStack
public static HmdVector3 mallocStack()
Returns a newHmdVector3
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static HmdVector3 callocStack()
Returns a newHmdVector3
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static HmdVector3 mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newHmdVector3
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static HmdVector3 callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newHmdVector3
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static HmdVector3.Buffer mallocStack(int capacity)
Returns a newHmdVector3.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static HmdVector3.Buffer callocStack(int capacity)
Returns a newHmdVector3.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static HmdVector3.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newHmdVector3.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static HmdVector3.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newHmdVector3.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nv
public static java.nio.FloatBuffer nv(long struct)
Unsafe version ofv()
.
-
nv
public static float nv(long struct, int index)
Unsafe version ofv
.
-
nv
public static void nv(long struct, java.nio.FloatBuffer value)
Unsafe version ofv
.
-
nv
public static void nv(long struct, int index, float value)
Unsafe version ofv
.
-
-