oculus1
view libovr/Src/win32/OVR_Win32_SensorDevice.cpp @ 6:d6dd6372add6
foo
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 15 Sep 2013 22:14:41 +0300 |
parents | |
children |
line source
1 /************************************************************************************
3 Filename : OVR_Win32_SensorDevice.cpp
4 Content : Win32 SensorDevice implementation
5 Created : March 12, 2013
6 Authors : Lee Cooper
8 Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved.
10 Use of this software is subject to the terms of the Oculus license
11 agreement provided at the time of installation or download, or which
12 otherwise accompanies this software in either electronic or hard copy form.
14 *************************************************************************************/
16 #include "OVR_Win32_SensorDevice.h"
18 #include "OVR_Win32_HMDDevice.h"
19 #include "OVR_SensorImpl.h"
20 #include "OVR_DeviceImpl.h"
22 namespace OVR { namespace Win32 {
24 } // namespace Win32
26 //-------------------------------------------------------------------------------------
27 void SensorDeviceImpl::EnumerateHMDFromSensorDisplayInfo
28 (const SensorDisplayInfoImpl& displayInfo,
29 DeviceFactory::EnumerateVisitor& visitor)
30 {
32 Win32::HMDDeviceCreateDesc hmdCreateDesc(&Win32::HMDDeviceFactory::Instance, String(), String());
33 hmdCreateDesc.SetScreenParameters( 0, 0,
34 displayInfo.HResolution, displayInfo.VResolution,
35 displayInfo.HScreenSize, displayInfo.VScreenSize);
37 if ((displayInfo.DistortionType & SensorDisplayInfoImpl::Mask_BaseFmt) == SensorDisplayInfoImpl::Base_Distortion)
38 hmdCreateDesc.SetDistortion(displayInfo.DistortionK);
39 if (displayInfo.HScreenSize > 0.14f)
40 hmdCreateDesc.Set7Inch();
42 visitor.Visit(hmdCreateDesc);
43 }
45 } // namespace OVR