Package org.lwjgl.ovr

Class OVRHmdDesc

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


    public class OVRHmdDesc
    extends Struct
    A complete descriptor of the HMD.

    Member documentation

    • Type – this HMD's type. One of:
      Hmd_CBHmd_CV1Hmd_DK1Hmd_DK2Hmd_DKHDHmd_E3_2015Hmd_ES06Hmd_ES09Hmd_ES11Hmd_None
      Hmd_Other
    • 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 – capability bits described by ovrHmdCaps which the HMD currently supports
    • DefaultHmdCaps – capability bits described by ovrHmdCaps which are default for the current Hmd
    • AvailableTrackingCaps – capability bits described by ovrTrackingCaps which the system currently supports
    • DefaultTrackingCaps – capability bits described by ovrTrackingCaps which are default for the current system
    • 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 – nominal refresh rate of the display in cycles per second at the time of HMD creation

    Layout

    struct ovrHmdDesc {
        ovrHmdType Type;
        char[4];
        char[64] ProductName;
        char[64] Manufacturer;
        short VendorId;
        short ProductId;
        char[24] SerialNumber;
        short FirmwareMajor;
        short FirmwareMinor;
        unsigned int AvailableHmdCaps;
        unsigned int DefaultHmdCaps;
        unsigned int AvailableTrackingCaps;
        unsigned int DefaultTrackingCaps;
        ovrFovPort[2] DefaultEyeFov;
        ovrFovPort[2] MaxEyeFov;
        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()
        Description copied from class: Struct
        Returns the sizeof(struct).
        Specified by:
        sizeof in class 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.
      • create

        public static OVRHmdDesc create(long address)
        Returns a new OVRHmdDesc instance for the specified memory address or null if the 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
      • 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
      • callocStack

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

        public static OVRHmdDesc callocStack(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
      • 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
      • callocStack

        public static OVRHmdDesc.Buffer callocStack(int capacity,
                                                    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