Top Description Inners Fields Constructors Methods
org.lwjgl.openxr

public Class XrEyeGazeFB

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

Describes the eye gaze direction.
Description

If the returned isValid is true, the runtime must return gazePose and gazeConfidence.

If the returned isValid is false, it indicates either the eye tracker did not detect the eye gaze or the application lost input focus.

The eye gaze pose is natively oriented with +Y up, +X to the right, and -Z forward and not gravity-aligned, similar to the REFERENCE_SPACE_TYPE_VIEW.

Valid Usage (Implicit)
See Also

XrEyeGazesFB, XrPosef

Layout


struct XrEyeGazeFB {
    XrBool32 isValid;
    XrPosef gazePose;
    float gazeConfidence;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
XrEyeGazeFB.Buffer

An array of XrEyeGazeFB structs.

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
GAZECONFIDENCE

The struct member offsets.

public static final int
GAZEPOSE

The struct member offsets.

public static final int
ISVALID

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

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

public
XrEyeGazeFB(ByteBuffer container)

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

Method Summary

Modifier and TypeMethod and Description
public static XrEyeGazeFB
calloc()

Returns a new XrEyeGazeFB instance allocated with memCalloc.

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

Returns a new XrEyeGazeFB.Buffer instance allocated with memCalloc.

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

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

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

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

protected XrEyeGazeFB
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 XrEyeGazeFB
create()

Returns a new XrEyeGazeFB instance allocated with BufferUtils.

public static XrEyeGazeFB
create(long address)

Returns a new XrEyeGazeFB instance for the specified memory address.

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

Returns a new XrEyeGazeFB.Buffer instance allocated with BufferUtils.

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

Create a XrEyeGazeFB.Buffer instance at the specified memory.

public static XrEyeGazeFB
createSafe(long address)

Like create, but returns null if address is NULL.

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

Like create, but returns null if address is NULL.

public float
gazeConfidence()

a float value between 0 and 1 that represents the confidence for eye pose.

public XrEyeGazeFB
gazeConfidence(float value)

Sets the specified value to the gazeConfidence field.

public XrPosef
gazePose()

an XrPosef describing the position and orientation of the user’s eye.

public XrEyeGazeFB
gazePose(XrPosef value)

Copies the specified XrPosef to the gazePose field.

public XrEyeGazeFB
gazePose(Consumer<XrPosef> consumer)

Passes the gazePose field to the specified Consumer.

public boolean
isValid()

an XrBool32 indicating if the returned gazePose is valid.

public XrEyeGazeFB
isValid(boolean value)

Sets the specified value to the isValid field.

public static XrEyeGazeFB
malloc()

Returns a new XrEyeGazeFB instance allocated with memAlloc.

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

Returns a new XrEyeGazeFB.Buffer instance allocated with memAlloc.

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

Returns a new XrEyeGazeFB instance allocated on the specified MemoryStack.

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

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

public static float
ngazeConfidence(long struct)

Unsafe version of gazeConfidence.

public static void
ngazeConfidence(long struct, float value)

Unsafe version of gazeConfidence.

public static XrPosef
ngazePose(long struct)

Unsafe version of gazePose.

public static void
ngazePose(long struct, XrPosef value)

Unsafe version of gazePose.

public static int
nisValid(long struct)

Unsafe version of isValid.

public static void
nisValid(long struct, int value)

Unsafe version of isValid.

public XrEyeGazeFB
set(boolean isValid, XrPosef gazePose, float gazeConfidence)

Initializes this struct with the specified values.

public XrEyeGazeFB

Returns:

this struct
set
(XrEyeGazeFB
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).
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.

GAZECONFIDENCEback to summary
public static final int GAZECONFIDENCE

The struct member offsets.

GAZEPOSEback to summary
public static final int GAZEPOSE

The struct member offsets.

ISVALIDback to summary
public static final int ISVALID

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

Constructor Detail

XrEyeGazeFBback to summary
protected XrEyeGazeFB(long address, ByteBuffer container)
XrEyeGazeFBback to summary
public XrEyeGazeFB(ByteBuffer container)

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

callocback to summary
public static XrEyeGazeFB calloc()

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

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

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

Parameters
capacity:int

the buffer capacity

callocback to summary
public static XrEyeGazeFB calloc(MemoryStack stack)

Returns a new XrEyeGazeFB 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 XrEyeGazeFB.Buffer calloc(int capacity, MemoryStack stack)

Returns a new XrEyeGazeFB.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 XrEyeGazeFB 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 XrEyeGazeFB create()

Returns a new XrEyeGazeFB instance allocated with BufferUtils.

createback to summary
public static XrEyeGazeFB create(long address)

Returns a new XrEyeGazeFB instance for the specified memory address.

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

Returns a new XrEyeGazeFB.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

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

Create a XrEyeGazeFB.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static XrEyeGazeFB createSafe(long address)

Like create, but returns null if address is NULL.

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

Like create, but returns null if address is NULL.

Annotations
@Nullable
gazeConfidenceback to summary
public float gazeConfidence()

a float value between 0 and 1 that represents the confidence for eye pose. A value of 0 represents no confidence in the pose returned, and a value of 1 means maximum confidence in the returned eye pose.

gazeConfidenceback to summary
public XrEyeGazeFB gazeConfidence(float value)

Sets the specified value to the gazeConfidence field.

gazePoseback to summary
public XrPosef gazePose()

an XrPosef describing the position and orientation of the user’s eye. The pose is represented in the coordinate system provided by XrEyeGazesInfoFB::baseSpace.

gazePoseback to summary
public XrEyeGazeFB gazePose(XrPosef value)

Copies the specified XrPosef to the gazePose field.

gazePoseback to summary
public XrEyeGazeFB gazePose(Consumer<XrPosef> consumer)

Passes the gazePose field to the specified Consumer.

isValidback to summary
public boolean isValid()

an XrBool32 indicating if the returned gazePose is valid. Callers should check the validity of pose prior to use.

Annotations
@NativeType:XrBool32
isValidback to summary
public XrEyeGazeFB isValid(boolean value)

Sets the specified value to the isValid field.

mallocback to summary
public static XrEyeGazeFB malloc()

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

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

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

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static XrEyeGazeFB malloc(MemoryStack stack)

Returns a new XrEyeGazeFB instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

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

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

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

ngazeConfidenceback to summary
public static float ngazeConfidence(long struct)

Unsafe version of gazeConfidence.

ngazeConfidenceback to summary
public static void ngazeConfidence(long struct, float value)

Unsafe version of gazeConfidence.

ngazePoseback to summary
public static XrPosef ngazePose(long struct)

Unsafe version of gazePose.

ngazePoseback to summary
public static void ngazePose(long struct, XrPosef value)

Unsafe version of gazePose.

nisValidback to summary
public static int nisValid(long struct)

Unsafe version of isValid.

nisValidback to summary
public static void nisValid(long struct, int value)

Unsafe version of isValid.

setback to summary
public XrEyeGazeFB set(boolean isValid, XrPosef gazePose, float gazeConfidence)

Initializes this struct with the specified values.

setback to summary
public XrEyeGazeFB set(XrEyeGazeFB src)

Copies the specified struct data to this struct.

Parameters
src:XrEyeGazeFB

the source struct

Returns:XrEyeGazeFB

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
org.lwjgl.openxr back to summary

public Class XrEyeGazeFB.Buffer

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

An array of XrEyeGazeFB structs.

Field Summary

Modifier and TypeField and Description
private static final XrEyeGazeFB

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new XrEyeGazeFB.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 float

Returns:

the value of the XrEyeGazeFB#gazeConfidence field.
gazeConfidence
()

public XrEyeGazeFB.Buffer
gazeConfidence(float value)

Sets the specified value to the XrEyeGazeFB#gazeConfidence field.

public XrPosef

Returns:

a XrPosef view of the XrEyeGazeFB#gazePose field.
gazePose
()

public XrEyeGazeFB.Buffer
gazePose(XrPosef value)

Copies the specified XrPosef to the XrEyeGazeFB#gazePose field.

public XrEyeGazeFB.Buffer
gazePose(Consumer<XrPosef> consumer)

Passes the XrEyeGazeFB#gazePose field to the specified Consumer.

protected XrEyeGazeFB
public boolean

Returns:

the value of the XrEyeGazeFB#isValid field.
isValid
()

public XrEyeGazeFB.Buffer
isValid(boolean value)

Sets the specified value to the XrEyeGazeFB#isValid field.

protected XrEyeGazeFB.Buffer
Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final XrEyeGazeFB ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new XrEyeGazeFB.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 XrEyeGazeFB#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

gazeConfidenceback to summary
public float gazeConfidence()
Returns:float

the value of the XrEyeGazeFB#gazeConfidence field.

gazeConfidenceback to summary
public XrEyeGazeFB.Buffer gazeConfidence(float value)

Sets the specified value to the XrEyeGazeFB#gazeConfidence field.

gazePoseback to summary
public XrPosef gazePose()
Returns:XrPosef

a XrPosef view of the XrEyeGazeFB#gazePose field.

gazePoseback to summary
public XrEyeGazeFB.Buffer gazePose(XrPosef value)

Copies the specified XrPosef to the XrEyeGazeFB#gazePose field.

gazePoseback to summary
public XrEyeGazeFB.Buffer gazePose(Consumer<XrPosef> consumer)

Passes the XrEyeGazeFB#gazePose field to the specified Consumer.

getElementFactoryback to summary
protected XrEyeGazeFB getElementFactory()

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

Annotations
@Override
isValidback to summary
public boolean isValid()
Returns:boolean

the value of the XrEyeGazeFB#isValid field.

Annotations
@NativeType:XrBool32
isValidback to summary
public XrEyeGazeFB.Buffer isValid(boolean value)

Sets the specified value to the XrEyeGazeFB#isValid field.

selfback to summary
protected XrEyeGazeFB.Buffer self()

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

Annotations
@Override