Bike-X
0.8
Main Page
Namespaces
Data Structures
Files
File List
Globals
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
//-------------------------------------------------------------------------------------
36
void
SensorDeviceImpl::EnumerateHMDFromSensorDisplayInfo
(
const
SensorDisplayInfoImpl
& displayInfo,
37
DeviceFactory::EnumerateVisitor
& visitor)
38
{
39
Linux::HMDDeviceCreateDesc
hmdCreateDesc(&
Linux::HMDDeviceFactory::GetInstance
(),
String
(), 0);
40
41
hmdCreateDesc.
SetScreenParameters
( 0, 0,
42
displayInfo.
HResolution
, displayInfo.
VResolution
,
43
displayInfo.
HScreenSize
, displayInfo.
VScreenSize
,
44
displayInfo.
VCenter
, displayInfo.
LensSeparation
);
45
46
if
((displayInfo.
DistortionType
&
SensorDisplayInfoImpl::Mask_BaseFmt
) ==
SensorDisplayInfoImpl::Base_Distortion
)
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
OVR_DeviceImpl.h
OVR::DeviceFactory::EnumerateVisitor
Definition:
OVR_DeviceImpl.h:297
OVR::SensorDisplayInfoImpl::HResolution
UInt16 HResolution
Definition:
OVR_SensorImpl.h:167
OVR::SensorDisplayInfoImpl::VResolution
UInt16 VResolution
Definition:
OVR_SensorImpl.h:167
OVR::SensorDisplayInfoImpl::VCenter
float VCenter
Definition:
OVR_SensorImpl.h:169
OVR::SensorDeviceImpl::EnumerateHMDFromSensorDisplayInfo
static void EnumerateHMDFromSensorDisplayInfo(const SensorDisplayInfoImpl &displayInfo, DeviceFactory::EnumerateVisitor &visitor)
Definition:
OVR_Linux_SensorDevice.cpp:36
OVR::SensorDisplayInfoImpl::DistortionType
UByte DistortionType
Definition:
OVR_SensorImpl.h:166
OVR_Linux_HMDDevice.h
OVR::SensorDisplayInfoImpl::VScreenSize
float VScreenSize
Definition:
OVR_SensorImpl.h:168
OVR::SensorDisplayInfoImpl::DistortionK
float DistortionK[6]
Definition:
OVR_SensorImpl.h:176
OVR::String
Definition:
OVR_String.h:53
OVR::Linux::HMDDeviceCreateDesc::SetScreenParameters
void SetScreenParameters(int x, int y, int hres, int vres, float hsize, float vsize, float vCenterFromTopInMeters, float lensSeparationInMeters)
Definition:
OVR_Common_HMDDevice.cpp:39
OVR::SensorDisplayInfoImpl
Definition:
OVR_SensorImpl.h:150
OVR::Linux::HMDDeviceCreateDesc
Definition:
OVR_Linux_HMDDevice.h:56
OVR::SensorDisplayInfoImpl::LensSeparation
float LensSeparation
Definition:
OVR_SensorImpl.h:170
OVR::DeviceFactory::EnumerateVisitor::Visit
virtual void Visit(const DeviceCreateDesc &createDesc)=0
OVR::Linux::HMDDeviceCreateDesc::SetDistortion
void SetDistortion(const float *dks)
Definition:
OVR_Common_HMDDevice.cpp:55
OVR_SensorImpl.h
OVR::SensorDisplayInfoImpl::Base_Distortion
Definition:
OVR_SensorImpl.h:161
OVR::SensorDisplayInfoImpl::HScreenSize
float HScreenSize
Definition:
OVR_SensorImpl.h:168
OVR::Linux::HMDDeviceFactory::GetInstance
static HMDDeviceFactory & GetInstance()
Definition:
OVR_Linux_HMDDevice.cpp:190
OVR::SensorDisplayInfoImpl::Mask_BaseFmt
Definition:
OVR_SensorImpl.h:157
ovr
sdk
src
OVR_Linux_SensorDevice.cpp
Generated on Wed Oct 1 2014 00:45:20 for Bike-X by
1.8.6