nuclear@1: /************************************************************************************ nuclear@1: nuclear@1: Filename : OVR_Win32_SensorDevice.cpp nuclear@1: Content : Win32 SensorDevice implementation nuclear@1: Created : March 12, 2013 nuclear@1: Authors : Lee Cooper nuclear@1: nuclear@1: Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. nuclear@1: nuclear@1: Use of this software is subject to the terms of the Oculus license nuclear@1: agreement provided at the time of installation or download, or which nuclear@1: otherwise accompanies this software in either electronic or hard copy form. nuclear@1: nuclear@1: *************************************************************************************/ nuclear@1: nuclear@1: #include "OVR_Win32_SensorDevice.h" nuclear@1: nuclear@1: #include "OVR_Win32_HMDDevice.h" nuclear@1: #include "OVR_SensorImpl.h" nuclear@1: #include "OVR_DeviceImpl.h" nuclear@1: nuclear@1: namespace OVR { namespace Win32 { nuclear@1: nuclear@1: } // namespace Win32 nuclear@1: nuclear@1: //------------------------------------------------------------------------------------- nuclear@1: void SensorDeviceImpl::EnumerateHMDFromSensorDisplayInfo nuclear@1: (const SensorDisplayInfoImpl& displayInfo, nuclear@1: DeviceFactory::EnumerateVisitor& visitor) nuclear@1: { nuclear@1: nuclear@1: Win32::HMDDeviceCreateDesc hmdCreateDesc(&Win32::HMDDeviceFactory::Instance, String(), String()); nuclear@1: hmdCreateDesc.SetScreenParameters( 0, 0, nuclear@1: displayInfo.HResolution, displayInfo.VResolution, nuclear@1: displayInfo.HScreenSize, displayInfo.VScreenSize); nuclear@1: nuclear@1: if ((displayInfo.DistortionType & SensorDisplayInfoImpl::Mask_BaseFmt) == SensorDisplayInfoImpl::Base_Distortion) nuclear@1: hmdCreateDesc.SetDistortion(displayInfo.DistortionK); nuclear@1: if (displayInfo.HScreenSize > 0.14f) nuclear@1: hmdCreateDesc.Set7Inch(); nuclear@1: nuclear@1: visitor.Visit(hmdCreateDesc); nuclear@1: } nuclear@1: nuclear@1: } // namespace OVR nuclear@1: nuclear@1: