39 void HMDDeviceCreateDesc::SetScreenParameters(
int x,
int y,
41 float hsize,
float vsize,
42 float vCenterFromTopInMeters,
float lensSeparationInMeters)
46 ResolutionInPixels =
Sizei(hres, vres);
47 ScreenSizeInMeters =
Sizef(hsize, vsize);
48 VCenterFromTopInMeters = vCenterFromTopInMeters;
49 LensSeparationInMeters = lensSeparationInMeters;
51 Contents |= Contents_Screen;
55 void HMDDeviceCreateDesc::SetDistortion(
const float* dks)
57 for (
int i = 0; i < 4; i++)
58 DistortionK[i] = dks[i];
60 Contents |= Contents_Distortion;
71 if ( ResolutionInPixels.w == 1280 )
73 if ( ScreenSizeInMeters.w > 0.1497f && ScreenSizeInMeters.w < 0.1498f )
78 else if ( ResolutionInPixels.w == 1920 )
81 if ( ScreenSizeInMeters.w > 0.1209f && ScreenSizeInMeters.w < 0.1210f )
86 else if ( ScreenSizeInMeters.w > 0.1257f && ScreenSizeInMeters.w < 0.1258f )
99 if (sensor && sensor->GetDeviceInfo(&sinfo))
118 else if (ScreenSizeInMeters.w > 0.1295f && ScreenSizeInMeters.w < 0.1297f)
129 bool HMDDeviceCreateDesc::GetDeviceInfo(
DeviceInfo* info)
const
136 char const* deviceName =
"Oculus HMD";
140 case HmdType_DK1: deviceName =
"Oculus Rift DK1";
break;
145 case HmdType_DK2: deviceName =
"Oculus Rift DK2";
break;
146 default: deviceName =
"Oculus HMD";
break;
249 DisplayDeviceName.ToCStr());
250 #if defined(OVR_OS_WIN32)
252 #elif defined(OVR_OS_MAC)
254 #elif defined(OVR_OS_LINUX)
256 #elif defined(OVR_OS_ANDROID)
259 #error Unknown platform
301 if (profile_name && profile_name[0])
float CenterFromTopInMeters
const DeviceType InfoClassType
Size< float > ScreenSizeInMeters
virtual DeviceManager * GetManager() const
bool GetDeviceInfo(DeviceInfo *info) const
DeviceType GetType() const
Ptr< DeviceBase > pParent
virtual bool SetProfileName(const char *name)
Ptr< Profile > pCachedProfile
char *OVR_CDECL OVR_strcpy(char *dest, UPInt destsize, const char *src)
virtual ProfileManager * GetProfileManager() const =0
const char * GetDefaultUser(const DeviceBase *device)
float ScreenGapSizeInMeters
Profile * GetProfile(const DeviceBase *device, const char *user)
char DisplayDeviceName[32]
const char * ToCStr() const
float LensSeparationInMeters
DeviceEnumerator< D > EnumerateDevices(bool availableOnly=true)
virtual const char * GetProfileName()
Profile * GetDefaultProfile(const DeviceBase *device)
SByte DecodeBCD(UByte byte)
float VsyncToFirstScanline
virtual OVR::SensorDevice * GetSensor()
virtual bool Initialize(DeviceBase *parent)
struct OVR::HMDInfo::ShutterInfo Shutter
Size< int > ResolutionInPixels
virtual void SetCoordinateFrame(CoordinateFrame coordframe)=0
virtual Profile * GetProfile()
float FirstScanlineToLastScanline