Package org.lwjgl.ovr

Class OVRHmdDesc

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

    public class OVRHmdDesc
    extends Struct
    implements 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

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • TYPE, PRODUCTNAME, MANUFACTURER, VENDORID, PRODUCTID, SERIALNUMBER, FIRMWAREMAJOR, FIRMWAREMINOR, AVAILABLEHMDCAPS, DEFAULTHMDCAPS, AVAILABLETRACKINGCAPS, DEFAULTTRACKINGCAPS, DEFAULTEYEFOV, MAXEYEFOV, RESOLUTION, DISPLAYREFRESHRATE

        The struct member offsets.
    • 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 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.
      • Resolution

        public OVRHmdDesc Resolution​(java.util.function.Consumer<OVRSizei> consumer)
        Passes the Resolution field to the specified Consumer.
      • 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.
      • createSafe

        @Nullable
        public static OVRHmdDesc createSafe​(long address)
        Like create, but returns null if address is NULL.
      • 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
      • nType

        public static int nType​(long struct)
        Unsafe version of Type().
      • nProductName

        public static java.nio.ByteBuffer nProductName​(long struct)
        Unsafe version of ProductName().
      • nProductNameString

        public static java.lang.String nProductNameString​(long struct)
        Unsafe version of ProductNameString().
      • nManufacturer

        public static java.nio.ByteBuffer nManufacturer​(long struct)
        Unsafe version of Manufacturer().
      • nManufacturerString

        public static java.lang.String nManufacturerString​(long struct)
        Unsafe version of ManufacturerString().
      • nVendorId

        public static short nVendorId​(long struct)
        Unsafe version of VendorId().
      • nProductId

        public static short nProductId​(long struct)
        Unsafe version of ProductId().
      • nSerialNumber

        public static java.nio.ByteBuffer nSerialNumber​(long struct)
        Unsafe version of SerialNumber().
      • nSerialNumberString

        public static java.lang.String nSerialNumberString​(long struct)
        Unsafe version of SerialNumberString().
      • nFirmwareMajor

        public static short nFirmwareMajor​(long struct)
        Unsafe version of FirmwareMajor().
      • nFirmwareMinor

        public static short nFirmwareMinor​(long struct)
        Unsafe version of FirmwareMinor().
      • nAvailableHmdCaps

        public static int nAvailableHmdCaps​(long struct)
        Unsafe version of AvailableHmdCaps().
      • nDefaultHmdCaps

        public static int nDefaultHmdCaps​(long struct)
        Unsafe version of DefaultHmdCaps().
      • nAvailableTrackingCaps

        public static int nAvailableTrackingCaps​(long struct)
        Unsafe version of AvailableTrackingCaps().
      • nDefaultTrackingCaps

        public static int nDefaultTrackingCaps​(long struct)
        Unsafe version of DefaultTrackingCaps().
      • nDefaultEyeFov

        public static OVRFovPort nDefaultEyeFov​(long struct,
                                                int index)
        Unsafe version of DefaultEyeFov.
      • nMaxEyeFov

        public static OVRFovPort nMaxEyeFov​(long struct,
                                            int index)
        Unsafe version of MaxEyeFov.
      • nDisplayRefreshRate

        public static float nDisplayRefreshRate​(long struct)
        Unsafe version of DisplayRefreshRate().