Bike-X  0.8
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
OVR_Linux_SensorDevice.cpp
Go to the documentation of this file.
1 /************************************************************************************
2 
3 Filename : OVR_Linux_SensorDevice.cpp
4 Content : Linux SensorDevice implementation
5 Created : June 13, 2013
6 Authors : Brant Lewis
7 
8 Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
9 
10 Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
11 you may not use the Oculus VR Rift SDK except in compliance with the License,
12 which is provided at the time of installation or download, or which
13 otherwise accompanies this software in either electronic or hard copy form.
14 
15 You may obtain a copy of the License at
16 
17 http://www.oculusvr.com/licenses/LICENSE-3.1
18 
19 Unless required by applicable law or agreed to in writing, the Oculus VR SDK
20 distributed under the License is distributed on an "AS IS" BASIS,
21 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 See the License for the specific language governing permissions and
23 limitations under the License.
24 
25 *************************************************************************************/
26 
27 #include "OVR_Linux_HMDDevice.h"
28 #include "OVR_SensorImpl.h"
29 #include "OVR_DeviceImpl.h"
30 
31 namespace OVR { namespace Linux {
32 
33 } // namespace Linux
34 
35 //-------------------------------------------------------------------------------------
38 {
40 
41  hmdCreateDesc.SetScreenParameters( 0, 0,
42  displayInfo.HResolution, displayInfo.VResolution,
43  displayInfo.HScreenSize, displayInfo.VScreenSize,
44  displayInfo.VCenter, displayInfo.LensSeparation);
45 
47  {
48  // TODO: update to spline system.
49  hmdCreateDesc.SetDistortion(displayInfo.DistortionK);
50  }
51 
52  visitor.Visit(hmdCreateDesc);
53 }
54 
55 } // namespace OVR
56 
57 
static void EnumerateHMDFromSensorDisplayInfo(const SensorDisplayInfoImpl &displayInfo, DeviceFactory::EnumerateVisitor &visitor)
void SetScreenParameters(int x, int y, int hres, int vres, float hsize, float vsize, float vCenterFromTopInMeters, float lensSeparationInMeters)
virtual void Visit(const DeviceCreateDesc &createDesc)=0
static HMDDeviceFactory & GetInstance()