Class XrEyeGazeFB

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<XrEyeGazeFB>
org.lwjgl.openxr.XrEyeGazeFB
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class XrEyeGazeFB extends org.lwjgl.system.Struct<XrEyeGazeFB> implements org.lwjgl.system.NativeResource
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();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • ISVALID

      public static final int ISVALID
      The struct member offsets.
    • GAZEPOSE

      public static final int GAZEPOSE
      The struct member offsets.
    • GAZECONFIDENCE

      public static final int GAZECONFIDENCE
      The struct member offsets.
  • Constructor Details

    • XrEyeGazeFB

      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 Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<XrEyeGazeFB>
    • isValid

      public boolean isValid()
      an XrBool32 indicating if the returned gazePose is valid. Callers should check the validity of pose prior to use.
    • gazePose

      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.
    • gazeConfidence

      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.
    • isValid

      public XrEyeGazeFB isValid(boolean value)
      Sets the specified value to the isValid() field.
    • gazePose

      public XrEyeGazeFB gazePose(XrPosef value)
      Copies the specified XrPosef to the gazePose() field.
    • gazePose

      public XrEyeGazeFB gazePose(Consumer<XrPosef> consumer)
      Passes the gazePose() field to the specified Consumer.
    • gazeConfidence

      public XrEyeGazeFB gazeConfidence(float value)
      Sets the specified value to the gazeConfidence() field.
    • set

      public XrEyeGazeFB set(boolean isValid, XrPosef gazePose, float gazeConfidence)
      Initializes this struct with the specified values.
    • set

      public XrEyeGazeFB set(XrEyeGazeFB src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static XrEyeGazeFB malloc()
      Returns a new XrEyeGazeFB instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static XrEyeGazeFB calloc()
      Returns a new XrEyeGazeFB instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static XrEyeGazeFB create()
      Returns a new XrEyeGazeFB instance allocated with BufferUtils.
    • create

      public static XrEyeGazeFB create(long address)
      Returns a new XrEyeGazeFB instance for the specified memory address.
    • createSafe

      public static @Nullable XrEyeGazeFB createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static XrEyeGazeFB.Buffer malloc(int capacity)
      Returns a new XrEyeGazeFB.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static XrEyeGazeFB.Buffer calloc(int capacity)
      Returns a new XrEyeGazeFB.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static XrEyeGazeFB.Buffer create(int capacity)
      Returns a new XrEyeGazeFB.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static XrEyeGazeFB.Buffer create(long address, int capacity)
      Create a XrEyeGazeFB.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable XrEyeGazeFB.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static XrEyeGazeFB malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new XrEyeGazeFB instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static XrEyeGazeFB calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new XrEyeGazeFB instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static XrEyeGazeFB.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new XrEyeGazeFB.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static XrEyeGazeFB.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new XrEyeGazeFB.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nisValid

      public static int nisValid(long struct)
      Unsafe version of isValid().
    • ngazePose

      public static XrPosef ngazePose(long struct)
      Unsafe version of gazePose().
    • ngazeConfidence

      public static float ngazeConfidence(long struct)
      Unsafe version of gazeConfidence().
    • nisValid

      public static void nisValid(long struct, int value)
      Unsafe version of isValid.
    • ngazePose

      public static void ngazePose(long struct, XrPosef value)
      Unsafe version of gazePose.
    • ngazeConfidence

      public static void ngazeConfidence(long struct, float value)
      Unsafe version of gazeConfidence.