Class XrFovf

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class XrFovf
    extends org.lwjgl.system.Struct
    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, 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  XrFovf.Buffer
      An array of XrFovf structs.
      • Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

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

        org.lwjgl.system.Struct.StructValidation
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ALIGNOF
      The struct alignment in bytes.
      static int ANGLEDOWN
      ANGLELEFT
      ANGLERIGHT
      ANGLEUP
      The struct member offsets.
      static int SIZEOF
      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​(java.nio.ByteBuffer container)
      Creates a XrFovf instance at the current position of the specified ByteBuffer container.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      float angleDown()
      the angle of the bottom part of the field of view.
      XrFovf angleDown​(float value)
      Sets the specified value to the angleDown() field.
      float angleLeft()
      the angle of the left side of the field of view.
      XrFovf angleLeft​(float value)
      Sets the specified value to the angleLeft() field.
      float angleRight()
      the angle of the right side of the field of view.
      XrFovf angleRight​(float value)
      Sets the specified value to the angleRight() field.
      float angleUp()
      the angle of the top part of the field of view.
      XrFovf angleUp​(float value)
      Sets the specified value to the angleUp() field.
      static XrFovf calloc()
      Returns a new XrFovf instance allocated with memCalloc.
      static XrFovf.Buffer calloc​(int capacity)
      Returns a new XrFovf.Buffer instance allocated with memCalloc.
      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.
      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 create()
      Returns a new XrFovf instance allocated with BufferUtils.
      static XrFovf.Buffer 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.
      static XrFovf.Buffer create​(long address, int capacity)
      Create a XrFovf.Buffer instance at the specified memory.
      static XrFovf createSafe​(long address)
      Like create, but returns null if address is NULL.
      static XrFovf.Buffer createSafe​(long address, int capacity)
      Like create, but returns null if address is NULL.
      static XrFovf malloc()
      Returns a new XrFovf instance allocated with memAlloc.
      static XrFovf.Buffer malloc​(int capacity)
      Returns a new XrFovf.Buffer instance allocated with memAlloc.
      static XrFovf.Buffer 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.
      XrFovf set​(float angleLeft, float angleRight, float angleUp, float angleDown)
      Initializes this struct with the specified values.
      XrFovf set​(XrFovf src)
      Copies the specified struct data to this struct.
      int sizeof()  
      • Methods inherited from interface org.lwjgl.system.NativeResource

        close, free
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from class org.lwjgl.system.Pointer.Default

        address, equals, hashCode, toString
      • Methods inherited from class org.lwjgl.system.Struct

        clear, free, isNull, validate
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • ANGLELEFT, ANGLERIGHT, ANGLEUP, ANGLEDOWN

        The struct member offsets.
    • Constructor Detail

      • XrFovf

        public XrFovf​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • 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

        @Nullable
        public static 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

        @Nullable
        public static 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:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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.