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, NativeResource, Pointer
public class OVRHmdDesc extends Struct
A complete descriptor of the HMD.Member documentation
Type
– this HMD's type. One of:Hmd_CB
Hmd_CV1
Hmd_DK1
Hmd_DK2
Hmd_DKHD
Hmd_E3_2015
Hmd_ES06
Hmd_ES09
Hmd_ES11
Hmd_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 deviceProductId
– HID Product ID of the deviceSerialNumber
– HMD serial numberFirmwareMajor
– HMD firmware major version numberFirmwareMinor
– HMD firmware minor version numberAvailableHmdCaps
– capability bits described byovrHmdCaps
which the HMD currently supportsDefaultHmdCaps
– capability bits described byovrHmdCaps
which are default for the currentHmd
AvailableTrackingCaps
– capability bits described byovrTrackingCaps
which the system currently supportsDefaultTrackingCaps
– capability bits described byovrTrackingCaps
which are default for the current systemDefaultEyeFov
– the recommended optical FOV for the HMDMaxEyeFov
– the maximum optical FOV for the HMDResolution
– resolution of the full HMD screen (both eyes) in pixelsDisplayRefreshRate
– 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]; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
OVRHmdDesc.Buffer
An array ofOVRHmdDesc
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and 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 and 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.Buffer
calloc(int capacity)
Returns a newOVRHmdDesc.Buffer
instance allocated withmemCalloc
.static OVRHmdDesc
callocStack()
Returns a newOVRHmdDesc
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static OVRHmdDesc.Buffer
callocStack(int capacity)
Returns a newOVRHmdDesc.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static OVRHmdDesc.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newOVRHmdDesc.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static OVRHmdDesc
callocStack(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.Buffer
create(int capacity)
Returns a newOVRHmdDesc.Buffer
instance allocated withBufferUtils
.static OVRHmdDesc
create(long address)
static OVRHmdDesc.Buffer
create(long address, int capacity)
Create aOVRHmdDesc.Buffer
instance at the specified memory.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.Buffer
malloc(int capacity)
Returns a newOVRHmdDesc.Buffer
instance allocated withmemAlloc
.static OVRHmdDesc
mallocStack()
Returns a newOVRHmdDesc
instance allocated on the thread-localMemoryStack
.static OVRHmdDesc.Buffer
mallocStack(int capacity)
Returns a newOVRHmdDesc.Buffer
instance allocated on the thread-localMemoryStack
.static OVRHmdDesc.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newOVRHmdDesc.Buffer
instance allocated on the specifiedMemoryStack
.static OVRHmdDesc
mallocStack(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.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()
Returns thesizeof(struct)
.int
Type()
Returns the value of theType
field.short
VendorId()
Returns the value of theVendorId
field.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
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()
Description copied from class:Struct
Returns thesizeof(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)
-
malloc
public static OVRHmdDesc.Buffer malloc(int capacity)
Returns a newOVRHmdDesc.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static OVRHmdDesc.Buffer calloc(int capacity)
Returns a newOVRHmdDesc.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static OVRHmdDesc.Buffer create(int capacity)
Returns a newOVRHmdDesc.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static OVRHmdDesc.Buffer create(long address, int capacity)
Create aOVRHmdDesc.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
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(MemoryStack stack)
Returns a newOVRHmdDesc
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static OVRHmdDesc callocStack(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
-
mallocStack
public static OVRHmdDesc.Buffer mallocStack(int capacity)
Returns a newOVRHmdDesc.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static OVRHmdDesc.Buffer callocStack(int capacity)
Returns a newOVRHmdDesc.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static OVRHmdDesc.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newOVRHmdDesc.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static OVRHmdDesc.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newOVRHmdDesc.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
-