Package org.lwjgl.ovr
Class OVRHmdDesc
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.ovr.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_None
Hmd_DK1
Hmd_DKHD
Hmd_DK2
Hmd_CB
Hmd_Other
Hmd_E3_2015
Hmd_ES06
Hmd_ES09
Hmd_ES11
Hmd_CV1
Hmd_RiftS
ProductName[64]
– name string describing the product: "Oculus Rift DK1", etc.Manufacturer[64]
– string describing the manufacturer. Usually "Oculus".VendorId
– HID Vendor ID of the deviceProductId
– HID Product ID of the deviceSerialNumber[24]
– HMD serial numberFirmwareMajor
– HMD firmware major version numberFirmwareMinor
– HMD firmware minor version numberAvailableHmdCaps
– availableovrHmdCaps
bitsDefaultHmdCaps
– defaultovrHmdCaps
bitsAvailableTrackingCaps
– availableovrTrackingCaps
bitsDefaultTrackingCaps
– defaultovrTrackingCaps
bitsDefaultEyeFov[ovrEye_Count]
– the recommended optical FOV for the HMDMaxEyeFov[ovrEye_Count]
– the maximum optical FOV for the HMDResolution
– resolution of the full HMD screen (both eyes) in pixelsDisplayRefreshRate
– 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; }
-
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
AVAILABLEHMDCAPS
AVAILABLETRACKINGCAPS
DEFAULTEYEFOV
DEFAULTHMDCAPS
DEFAULTTRACKINGCAPS
DISPLAYREFRESHRATE
FIRMWAREMAJOR
FIRMWAREMINOR
MANUFACTURER
MAXEYEFOV
PRODUCTID
PRODUCTNAME
RESOLUTION
SERIALNUMBERThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
TYPE
VENDORIDThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description OVRHmdDesc(java.nio.ByteBuffer container)
Creates aOVRHmdDesc
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
AvailableHmdCaps()
Returns the value of theAvailableHmdCaps
field.int
AvailableTrackingCaps()
Returns the value of theAvailableTrackingCaps
field.static OVRHmdDesc
calloc()
Returns a newOVRHmdDesc
instance allocated withmemCalloc
.static OVRHmdDesc
callocStack()
Returns a newOVRHmdDesc
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static OVRHmdDesc
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRHmdDesc
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static OVRHmdDesc
create()
Returns a newOVRHmdDesc
instance allocated withBufferUtils
.static OVRHmdDesc
create(long address)
Returns a newOVRHmdDesc
instance for the specified memory address.static OVRHmdDesc
createSafe(long address)
OVRFovPort.Buffer
DefaultEyeFov()
Returns aOVRFovPort
.Buffer view of theDefaultEyeFov
field.OVRFovPort
DefaultEyeFov(int index)
Returns aOVRFovPort
view of the struct at the specified index of theDefaultEyeFov
field.int
DefaultHmdCaps()
Returns the value of theDefaultHmdCaps
field.int
DefaultTrackingCaps()
Returns the value of theDefaultTrackingCaps
field.float
DisplayRefreshRate()
Returns the value of theDisplayRefreshRate
field.short
FirmwareMajor()
Returns the value of theFirmwareMajor
field.short
FirmwareMinor()
Returns the value of theFirmwareMinor
field.static OVRHmdDesc
malloc()
Returns a newOVRHmdDesc
instance allocated withmemAlloc
.static OVRHmdDesc
mallocStack()
Returns a newOVRHmdDesc
instance allocated on the thread-localMemoryStack
.static OVRHmdDesc
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRHmdDesc
instance allocated on the specifiedMemoryStack
.java.nio.ByteBuffer
Manufacturer()
Returns aByteBuffer
view of theManufacturer
field.java.lang.String
ManufacturerString()
Decodes the null-terminated string stored in theManufacturer
field.OVRFovPort.Buffer
MaxEyeFov()
Returns aOVRFovPort
.Buffer view of theMaxEyeFov
field.OVRFovPort
MaxEyeFov(int index)
Returns aOVRFovPort
view of the struct at the specified index of theMaxEyeFov
field.static int
nAvailableHmdCaps(long struct)
Unsafe version ofAvailableHmdCaps()
.static int
nAvailableTrackingCaps(long struct)
Unsafe version ofAvailableTrackingCaps()
.static OVRFovPort.Buffer
nDefaultEyeFov(long struct)
Unsafe version ofDefaultEyeFov()
.static OVRFovPort
nDefaultEyeFov(long struct, int index)
Unsafe version ofDefaultEyeFov
.static int
nDefaultHmdCaps(long struct)
Unsafe version ofDefaultHmdCaps()
.static int
nDefaultTrackingCaps(long struct)
Unsafe version ofDefaultTrackingCaps()
.static float
nDisplayRefreshRate(long struct)
Unsafe version ofDisplayRefreshRate()
.static short
nFirmwareMajor(long struct)
Unsafe version ofFirmwareMajor()
.static short
nFirmwareMinor(long struct)
Unsafe version ofFirmwareMinor()
.static java.nio.ByteBuffer
nManufacturer(long struct)
Unsafe version ofManufacturer()
.static java.lang.String
nManufacturerString(long struct)
Unsafe version ofManufacturerString()
.static OVRFovPort.Buffer
nMaxEyeFov(long struct)
Unsafe version ofMaxEyeFov()
.static OVRFovPort
nMaxEyeFov(long struct, int index)
Unsafe version ofMaxEyeFov
.static short
nProductId(long struct)
Unsafe version ofProductId()
.static java.nio.ByteBuffer
nProductName(long struct)
Unsafe version ofProductName()
.static java.lang.String
nProductNameString(long struct)
Unsafe version ofProductNameString()
.static OVRSizei
nResolution(long struct)
Unsafe version ofResolution()
.static java.nio.ByteBuffer
nSerialNumber(long struct)
Unsafe version ofSerialNumber()
.static java.lang.String
nSerialNumberString(long struct)
Unsafe version ofSerialNumberString()
.static int
nType(long struct)
Unsafe version ofType()
.static short
nVendorId(long struct)
Unsafe version ofVendorId()
.short
ProductId()
Returns the value of theProductId
field.java.nio.ByteBuffer
ProductName()
Returns aByteBuffer
view of theProductName
field.java.lang.String
ProductNameString()
Decodes the null-terminated string stored in theProductName
field.OVRSizei
Resolution()
Returns aOVRSizei
view of theResolution
field.java.nio.ByteBuffer
SerialNumber()
Returns aByteBuffer
view of theSerialNumber
field.java.lang.String
SerialNumberString()
Decodes the null-terminated string stored in theSerialNumber
field.int
sizeof()
int
Type()
Returns the value of theType
field.short
VendorId()
Returns the value of theVendorId
field.
-
-
-
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 aOVRHmdDesc
instance at the current position of the specifiedByteBuffer
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 classorg.lwjgl.system.Struct
-
Type
public int Type()
Returns the value of theType
field.
-
ProductName
public java.nio.ByteBuffer ProductName()
Returns aByteBuffer
view of theProductName
field.
-
ProductNameString
public java.lang.String ProductNameString()
Decodes the null-terminated string stored in theProductName
field.
-
Manufacturer
public java.nio.ByteBuffer Manufacturer()
Returns aByteBuffer
view of theManufacturer
field.
-
ManufacturerString
public java.lang.String ManufacturerString()
Decodes the null-terminated string stored in theManufacturer
field.
-
VendorId
public short VendorId()
Returns the value of theVendorId
field.
-
ProductId
public short ProductId()
Returns the value of theProductId
field.
-
SerialNumber
public java.nio.ByteBuffer SerialNumber()
Returns aByteBuffer
view of theSerialNumber
field.
-
SerialNumberString
public java.lang.String SerialNumberString()
Decodes the null-terminated string stored in theSerialNumber
field.
-
FirmwareMajor
public short FirmwareMajor()
Returns the value of theFirmwareMajor
field.
-
FirmwareMinor
public short FirmwareMinor()
Returns the value of theFirmwareMinor
field.
-
AvailableHmdCaps
public int AvailableHmdCaps()
Returns the value of theAvailableHmdCaps
field.
-
DefaultHmdCaps
public int DefaultHmdCaps()
Returns the value of theDefaultHmdCaps
field.
-
AvailableTrackingCaps
public int AvailableTrackingCaps()
Returns the value of theAvailableTrackingCaps
field.
-
DefaultTrackingCaps
public int DefaultTrackingCaps()
Returns the value of theDefaultTrackingCaps
field.
-
DefaultEyeFov
public OVRFovPort.Buffer DefaultEyeFov()
Returns aOVRFovPort
.Buffer view of theDefaultEyeFov
field.
-
DefaultEyeFov
public OVRFovPort DefaultEyeFov(int index)
Returns aOVRFovPort
view of the struct at the specified index of theDefaultEyeFov
field.
-
MaxEyeFov
public OVRFovPort.Buffer MaxEyeFov()
Returns aOVRFovPort
.Buffer view of theMaxEyeFov
field.
-
MaxEyeFov
public OVRFovPort MaxEyeFov(int index)
Returns aOVRFovPort
view of the struct at the specified index of theMaxEyeFov
field.
-
DisplayRefreshRate
public float DisplayRefreshRate()
Returns the value of theDisplayRefreshRate
field.
-
malloc
public static OVRHmdDesc malloc()
Returns a newOVRHmdDesc
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static OVRHmdDesc calloc()
Returns a newOVRHmdDesc
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static OVRHmdDesc create()
Returns a newOVRHmdDesc
instance allocated withBufferUtils
.
-
create
public static OVRHmdDesc create(long address)
Returns a newOVRHmdDesc
instance for the specified memory address.
-
createSafe
@Nullable public static OVRHmdDesc createSafe(long address)
-
mallocStack
public static OVRHmdDesc mallocStack()
Returns a newOVRHmdDesc
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static OVRHmdDesc callocStack()
Returns a newOVRHmdDesc
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static OVRHmdDesc mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRHmdDesc
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static OVRHmdDesc callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRHmdDesc
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
nType
public static int nType(long struct)
Unsafe version ofType()
.
-
nProductName
public static java.nio.ByteBuffer nProductName(long struct)
Unsafe version ofProductName()
.
-
nProductNameString
public static java.lang.String nProductNameString(long struct)
Unsafe version ofProductNameString()
.
-
nManufacturer
public static java.nio.ByteBuffer nManufacturer(long struct)
Unsafe version ofManufacturer()
.
-
nManufacturerString
public static java.lang.String nManufacturerString(long struct)
Unsafe version ofManufacturerString()
.
-
nVendorId
public static short nVendorId(long struct)
Unsafe version ofVendorId()
.
-
nProductId
public static short nProductId(long struct)
Unsafe version ofProductId()
.
-
nSerialNumber
public static java.nio.ByteBuffer nSerialNumber(long struct)
Unsafe version ofSerialNumber()
.
-
nSerialNumberString
public static java.lang.String nSerialNumberString(long struct)
Unsafe version ofSerialNumberString()
.
-
nFirmwareMajor
public static short nFirmwareMajor(long struct)
Unsafe version ofFirmwareMajor()
.
-
nFirmwareMinor
public static short nFirmwareMinor(long struct)
Unsafe version ofFirmwareMinor()
.
-
nAvailableHmdCaps
public static int nAvailableHmdCaps(long struct)
Unsafe version ofAvailableHmdCaps()
.
-
nDefaultHmdCaps
public static int nDefaultHmdCaps(long struct)
Unsafe version ofDefaultHmdCaps()
.
-
nAvailableTrackingCaps
public static int nAvailableTrackingCaps(long struct)
Unsafe version ofAvailableTrackingCaps()
.
-
nDefaultTrackingCaps
public static int nDefaultTrackingCaps(long struct)
Unsafe version ofDefaultTrackingCaps()
.
-
nDefaultEyeFov
public static OVRFovPort.Buffer nDefaultEyeFov(long struct)
Unsafe version ofDefaultEyeFov()
.
-
nDefaultEyeFov
public static OVRFovPort nDefaultEyeFov(long struct, int index)
Unsafe version ofDefaultEyeFov
.
-
nMaxEyeFov
public static OVRFovPort.Buffer nMaxEyeFov(long struct)
Unsafe version ofMaxEyeFov()
.
-
nMaxEyeFov
public static OVRFovPort nMaxEyeFov(long struct, int index)
Unsafe version ofMaxEyeFov
.
-
nResolution
public static OVRSizei nResolution(long struct)
Unsafe version ofResolution()
.
-
nDisplayRefreshRate
public static float nDisplayRefreshRate(long struct)
Unsafe version ofDisplayRefreshRate()
.
-
-