OVR_Win32_SensorDevice.cpp
Go to the documentation of this file.
00001 /************************************************************************************
00002 
00003 Filename    :   OVR_Win32_SensorDevice.cpp
00004 Content     :   Win32 SensorDevice implementation
00005 Created     :   March 12, 2013
00006 Authors     :   Lee Cooper
00007 
00008 Copyright   :   Copyright 2013 Oculus VR, Inc. All Rights reserved.
00009 
00010 Use of this software is subject to the terms of the Oculus license
00011 agreement provided at the time of installation or download, or which
00012 otherwise accompanies this software in either electronic or hard copy form.
00013 
00014 *************************************************************************************/
00015 
00016 #include "OVR_Win32_SensorDevice.h"
00017 
00018 #include "OVR_Win32_HMDDevice.h"
00019 #include "OVR_SensorImpl.h"
00020 #include "OVR_DeviceImpl.h"
00021 
00022 namespace OVR { namespace Win32 {
00023 
00024 } // namespace Win32
00025 
00026 //-------------------------------------------------------------------------------------
00027 void SensorDeviceImpl::EnumerateHMDFromSensorDisplayInfo
00028     (const SensorDisplayInfoImpl& displayInfo, 
00029      DeviceFactory::EnumerateVisitor& visitor)
00030 {
00031 
00032     Win32::HMDDeviceCreateDesc hmdCreateDesc(&Win32::HMDDeviceFactory::Instance, String(), String());
00033     hmdCreateDesc.SetScreenParameters(  0, 0,
00034                                         displayInfo.HResolution, displayInfo.VResolution,
00035                                         displayInfo.HScreenSize, displayInfo.VScreenSize);
00036 
00037     if ((displayInfo.DistortionType & SensorDisplayInfoImpl::Mask_BaseFmt) == SensorDisplayInfoImpl::Base_Distortion)
00038         hmdCreateDesc.SetDistortion(displayInfo.DistortionK);
00039     if (displayInfo.HScreenSize > 0.14f)
00040         hmdCreateDesc.Set7Inch();
00041 
00042     visitor.Visit(hmdCreateDesc);
00043 }
00044 
00045 } // namespace OVR
00046 
00047 


oculus_sdk
Author(s):
autogenerated on Mon Oct 6 2014 03:01:19