Class XrFovf

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

public class XrFovf extends org.lwjgl.system.Struct<XrFovf> implements org.lwjgl.system.NativeResource
Field of view.
Description

Angles to the right of the center and upwards from the center are positive, and angles to the left of the center and down from the center are negative. The total horizontal field of view is angleRight minus angleLeft, and the total vertical field of view is angleUp minus angleDown. For a symmetric FoV, angleRight and angleUp will have positive values, angleLeft will be -angleRight, and angleDown will be -angleUp.

The angles must be specified in radians, and must be between -π/2 and π/2 exclusively.

When angleLeft > angleRight, the content of the view must be flipped horizontally. When angleDown > angleUp, the content of the view must be flipped vertically.

See Also

XrCompositionLayerProjectionView, XrEnvironmentDepthImageViewMETA, XrExternalCameraIntrinsicsOCULUS, XrFrustumf, XrSceneFrustumBoundMSFT, XrView, XrViewConfigurationViewFovEPIC

Layout


 struct XrFovf {
     float angleLeft();
     float angleRight();
     float angleUp();
     float angleDown();
 }
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    An array of XrFovf structs.

    Nested classes/interfaces inherited from class org.lwjgl.system.Struct

    org.lwjgl.system.Struct.StructValidation

    Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

    org.lwjgl.system.Pointer.Default
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The struct alignment in bytes.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct size in bytes.

    Fields inherited from interface org.lwjgl.system.Pointer

    BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
  • Constructor Summary

    Constructors
    Constructor
    Description
    XrFovf(ByteBuffer container)
    Creates a XrFovf instance at the current position of the specified ByteBuffer container.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    the angle of the bottom part of the field of view.
    angleDown(float value)
    Sets the specified value to the angleDown() field.
    float
    the angle of the left side of the field of view.
    angleLeft(float value)
    Sets the specified value to the angleLeft() field.
    float
    the angle of the right side of the field of view.
    angleRight(float value)
    Sets the specified value to the angleRight() field.
    float
    the angle of the top part of the field of view.
    angleUp(float value)
    Sets the specified value to the angleUp() field.
    static XrFovf
    Returns a new XrFovf instance allocated with memCalloc.
    calloc(int capacity)
    Returns a new XrFovf.Buffer instance allocated with memCalloc.
    calloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new XrFovf.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
    static XrFovf
    calloc(org.lwjgl.system.MemoryStack stack)
    Returns a new XrFovf instance allocated on the specified MemoryStack and initializes all its bits to zero.
    static XrFovf
    Returns a new XrFovf instance allocated with BufferUtils.
    create(int capacity)
    Returns a new XrFovf.Buffer instance allocated with BufferUtils.
    static XrFovf
    create(long address)
    Returns a new XrFovf instance for the specified memory address.
    create(long address, int capacity)
    Create a XrFovf.Buffer instance at the specified memory.
    static @Nullable XrFovf
    createSafe(long address)
    Like create, but returns null if address is NULL.
    static @Nullable XrFovf.Buffer
    createSafe(long address, int capacity)
    Like create, but returns null if address is NULL.
    static XrFovf
    Returns a new XrFovf instance allocated with memAlloc.
    malloc(int capacity)
    Returns a new XrFovf.Buffer instance allocated with memAlloc.
    malloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new XrFovf.Buffer instance allocated on the specified MemoryStack.
    static XrFovf
    malloc(org.lwjgl.system.MemoryStack stack)
    Returns a new XrFovf instance allocated on the specified MemoryStack.
    static float
    nangleDown(long struct)
    Unsafe version of angleDown().
    static void
    nangleDown(long struct, float value)
    Unsafe version of angleDown.
    static float
    nangleLeft(long struct)
    Unsafe version of angleLeft().
    static void
    nangleLeft(long struct, float value)
    Unsafe version of angleLeft.
    static float
    nangleRight(long struct)
    Unsafe version of angleRight().
    static void
    nangleRight(long struct, float value)
    Unsafe version of angleRight.
    static float
    nangleUp(long struct)
    Unsafe version of angleUp().
    static void
    nangleUp(long struct, float value)
    Unsafe version of angleUp.
    set(float angleLeft, float angleRight, float angleUp, float angleDown)
    Initializes this struct with the specified values.
    set(XrFovf src)
    Copies the specified struct data to this struct.
    int
     

    Methods inherited from class org.lwjgl.system.Struct

    clear, free, isNull, validate, validate

    Methods inherited from class org.lwjgl.system.Pointer.Default

    address, equals, hashCode, toString

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.lwjgl.system.NativeResource

    close, free
  • Field Details

    • SIZEOF

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

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

      public static final int ANGLELEFT
      The struct member offsets.
    • ANGLERIGHT

      public static final int ANGLERIGHT
      The struct member offsets.
    • ANGLEUP

      public static final int ANGLEUP
      The struct member offsets.
    • ANGLEDOWN

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

    • XrFovf

      public XrFovf(ByteBuffer container)
      Creates a XrFovf 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<XrFovf>
    • angleLeft

      public float angleLeft()
      the angle of the left side of the field of view. For a symmetric field of view this value is negative.
    • angleRight

      public float angleRight()
      the angle of the right side of the field of view.
    • angleUp

      public float angleUp()
      the angle of the top part of the field of view.
    • angleDown

      public float angleDown()
      the angle of the bottom part of the field of view. For a symmetric field of view this value is negative.
    • angleLeft

      public XrFovf angleLeft(float value)
      Sets the specified value to the angleLeft() field.
    • angleRight

      public XrFovf angleRight(float value)
      Sets the specified value to the angleRight() field.
    • angleUp

      public XrFovf angleUp(float value)
      Sets the specified value to the angleUp() field.
    • angleDown

      public XrFovf angleDown(float value)
      Sets the specified value to the angleDown() field.
    • set

      public XrFovf set(float angleLeft, float angleRight, float angleUp, float angleDown)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static XrFovf.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new XrFovf.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
    • nangleLeft

      public static float nangleLeft(long struct)
      Unsafe version of angleLeft().
    • nangleRight

      public static float nangleRight(long struct)
      Unsafe version of angleRight().
    • nangleUp

      public static float nangleUp(long struct)
      Unsafe version of angleUp().
    • nangleDown

      public static float nangleDown(long struct)
      Unsafe version of angleDown().
    • nangleLeft

      public static void nangleLeft(long struct, float value)
      Unsafe version of angleLeft.
    • nangleRight

      public static void nangleRight(long struct, float value)
      Unsafe version of angleRight.
    • nangleUp

      public static void nangleUp(long struct, float value)
      Unsafe version of angleUp.
    • nangleDown

      public static void nangleDown(long struct, float value)
      Unsafe version of angleDown.