Package org.lwjgl.ovr

Class OVRHmdDesc

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


    public class OVRHmdDesc
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    A complete descriptor of the HMD.

    Member documentation

    • Type – this HMD's type. One of:
      Hmd_NoneHmd_DK1Hmd_DKHDHmd_DK2Hmd_CBHmd_OtherHmd_E3_2015Hmd_ES06Hmd_ES09Hmd_ES11
      Hmd_CV1
    • ProductName – name string describing the product: "Oculus Rift DK1", etc.
    • Manufacturer – string describing the manufacturer. Usually "Oculus".
    • VendorId – HID Vendor ID of the device
    • ProductId – HID Product ID of the device
    • SerialNumber – HMD serial number
    • FirmwareMajor – HMD firmware major version number
    • FirmwareMinor – HMD firmware minor version number
    • AvailableHmdCaps – available ovrHmdCaps bits
    • DefaultHmdCaps – default ovrHmdCaps bits
    • AvailableTrackingCaps – available ovrTrackingCaps bits
    • DefaultTrackingCaps – default ovrTrackingCaps bits
    • DefaultEyeFov – the recommended optical FOV for the HMD
    • MaxEyeFov – the maximum optical FOV for the HMD
    • Resolution – resolution of the full HMD screen (both eyes) in pixels
    • DisplayRefreshRate – refresh rate of the display in cycles per second at the time of HMD creation

    Layout

     struct ovrHmdDesc {
         ovrHmdType Type;
         char[4];
         char ProductName[64];
         char Manufacturer[64];
         short VendorId;
         short ProductId;
         char SerialNumber[24];
         short FirmwareMajor;
         short FirmwareMinor;
         unsigned int AvailableHmdCaps;
         unsigned int DefaultHmdCaps;
         unsigned int AvailableTrackingCaps;
         unsigned int DefaultTrackingCaps;
         ovrFovPort DefaultEyeFov[ovrEye_Count];
         ovrFovPort MaxEyeFov[ovrEye_Count];
         ovrSizei Resolution;
         float DisplayRefreshRate;
         char[4];
     }
    • Field Detail

      • SIZEOF

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

      • OVRHmdDesc

        public OVRHmdDesc(java.nio.ByteBuffer container)
        Creates a OVRHmdDesc 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
      • Type

        public int Type()
        Returns the value of the Type field.
      • ProductName

        public java.nio.ByteBuffer ProductName()
        Returns a ByteBuffer view of the ProductName field.
      • ProductNameString

        public java.lang.String ProductNameString()
        Decodes the null-terminated string stored in the ProductName field.
      • Manufacturer

        public java.nio.ByteBuffer Manufacturer()
        Returns a ByteBuffer view of the Manufacturer field.
      • ManufacturerString

        public java.lang.String ManufacturerString()
        Decodes the null-terminated string stored in the Manufacturer field.
      • VendorId

        public short VendorId()
        Returns the value of the VendorId field.
      • ProductId

        public short ProductId()
        Returns the value of the ProductId field.
      • SerialNumber

        public java.nio.ByteBuffer SerialNumber()
        Returns a ByteBuffer view of the SerialNumber field.
      • SerialNumberString

        public java.lang.String SerialNumberString()
        Decodes the null-terminated string stored in the SerialNumber field.
      • FirmwareMajor

        public short FirmwareMajor()
        Returns the value of the FirmwareMajor field.
      • FirmwareMinor

        public short FirmwareMinor()
        Returns the value of the FirmwareMinor field.
      • AvailableHmdCaps

        public int AvailableHmdCaps()
        Returns the value of the AvailableHmdCaps field.
      • DefaultHmdCaps

        public int DefaultHmdCaps()
        Returns the value of the DefaultHmdCaps field.
      • AvailableTrackingCaps

        public int AvailableTrackingCaps()
        Returns the value of the AvailableTrackingCaps field.
      • DefaultTrackingCaps

        public int DefaultTrackingCaps()
        Returns the value of the DefaultTrackingCaps field.
      • DefaultEyeFov

        public OVRFovPort DefaultEyeFov(int index)
        Returns a OVRFovPort view of the struct at the specified index of the DefaultEyeFov field.
      • MaxEyeFov

        public OVRFovPort MaxEyeFov(int index)
        Returns a OVRFovPort view of the struct at the specified index of the MaxEyeFov field.
      • Resolution

        public OVRSizei Resolution()
        Returns a OVRSizei view of the Resolution field.
      • DisplayRefreshRate

        public float DisplayRefreshRate()
        Returns the value of the DisplayRefreshRate field.
      • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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