Package org.lwjgl.ovr

Class OVRFovPort

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


    public class OVRFovPort
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Field Of View (FOV) in tangent of the angle units. As an example, for a standard 90 degree vertical FOV, we would have:
     { UpTan = tan(90 degrees / 2), DownTan = tan(90 degrees / 2) }

    Member documentation

    • UpTan – tangent of the angle between the viewing vector and top edge of the FOV
    • DownTan – tangent of the angle between the viewing vector and bottom edge of the FOV
    • LeftTan – tangent of the angle between the viewing vector and left edge of the FOV
    • RightTan – tangent of the angle between the viewing vector and right edge of the FOV

    Layout

     struct ovrFovPort {
         float UpTan;
         float DownTan;
         float LeftTan;
         float RightTan;
     }
    • Field Detail

      • SIZEOF

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

      • OVRFovPort

        public OVRFovPort(java.nio.ByteBuffer container)
        Creates a OVRFovPort 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()
        Description copied from class: org.lwjgl.system.Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • UpTan

        public float UpTan()
        Returns the value of the UpTan field.
      • DownTan

        public float DownTan()
        Returns the value of the DownTan field.
      • LeftTan

        public float LeftTan()
        Returns the value of the LeftTan field.
      • RightTan

        public float RightTan()
        Returns the value of the RightTan field.
      • UpTan

        public OVRFovPort UpTan(float value)
        Sets the specified value to the UpTan field.
      • DownTan

        public OVRFovPort DownTan(float value)
        Sets the specified value to the DownTan field.
      • LeftTan

        public OVRFovPort LeftTan(float value)
        Sets the specified value to the LeftTan field.
      • RightTan

        public OVRFovPort RightTan(float value)
        Sets the specified value to the RightTan field.
      • set

        public OVRFovPort set(float UpTan,
                              float DownTan,
                              float LeftTan,
                              float RightTan)
        Initializes this struct with the specified values.
      • set

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

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

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

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

        public static OVRFovPort create(long address)
        Returns a new OVRFovPort instance for the specified memory address or null if the address is NULL.
      • malloc

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

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

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

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

        public static OVRFovPort mallocStack()
        Returns a new OVRFovPort instance allocated on the thread-local MemoryStack.
      • callocStack

        public static OVRFovPort callocStack()
        Returns a new OVRFovPort instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

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

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

        public static OVRFovPort.Buffer mallocStack(int capacity)
        Returns a new OVRFovPort.Buffer instance allocated on the thread-local MemoryStack.
        Parameters:
        capacity - the buffer capacity
      • callocStack

        public static OVRFovPort.Buffer callocStack(int capacity)
        Returns a new OVRFovPort.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • mallocStack

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

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