OVR_OSX_SensorDevice.cpp
Go to the documentation of this file.
00001 /************************************************************************************
00002 
00003 Filename    :   OVR_OSX_SensorDevice.cpp
00004 Content     :   OSX SensorDevice implementation
00005 Created     :   March 14, 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_OSX_HMDDevice.h"
00017 #include "OVR_SensorImpl.h"
00018 #include "OVR_DeviceImpl.h"
00019 
00020 namespace OVR { namespace OSX {
00021 
00022 } // namespace OSX
00023 
00024 //-------------------------------------------------------------------------------------
00025 void SensorDeviceImpl::EnumerateHMDFromSensorDisplayInfo(   const SensorDisplayInfoImpl& displayInfo, 
00026                                                             DeviceFactory::EnumerateVisitor& visitor)
00027 {
00028 
00029     OSX::HMDDeviceCreateDesc hmdCreateDesc(&OSX::HMDDeviceFactory::Instance, 1, 1, "", 0);
00030     
00031     hmdCreateDesc.SetScreenParameters(  0, 0,
00032                                         displayInfo.HResolution, displayInfo.VResolution,
00033                                         displayInfo.HScreenSize, displayInfo.VScreenSize);
00034 
00035     if ((displayInfo.DistortionType & SensorDisplayInfoImpl::Mask_BaseFmt) == SensorDisplayInfoImpl::Base_Distortion)
00036         hmdCreateDesc.SetDistortion(displayInfo.DistortionK);
00037     if (displayInfo.HScreenSize > 0.14f)
00038         hmdCreateDesc.Set7Inch();
00039 
00040     visitor.Visit(hmdCreateDesc);
00041 }
00042 
00043 } // namespace OVR
00044 
00045 


oculus_sdk
Author(s):
autogenerated on Fri Aug 28 2015 11:53:11