History

assume that oculus will only be from APPLE machines

Stephen Birarda committed 13 years ago

Commit 4c2b7291 parent d43510c3 files · +5 −3Browse files

Showing the changes to interface/src/OculusManager.cpp (1 of 3 files). Show all

Unified · Split

interface/src/OculusManager.cpp+4−0
@@ -16,6 +16,7 @@ Ptr<SensorDevice> OculusManager::_sensorDevice; · 15 unmodified lines
1616 SensorFusion OculusManager::_sensorFusion;
1717
1818 void OculusManager::connect() {
19+#ifdef __APPLE__
1920 System::Init();
2021 _deviceManager = *DeviceManager::Create();
2122 _hmdDevice = *_deviceManager->EnumerateDevices<HMDDevice>().CreateDevice();
@@ -29,14 +30,17 @@ void OculusManager::connect() { · 7 unmodified lines
2930 // default the yaw to the current orientation
3031 _sensorFusion.SetMagReference();
3132 }
33+#endif
3234 }
3335
3436 void OculusManager::getEulerAngles(float& yaw, float& pitch, float& roll) {
37+#ifdef __APPLE__
3538 _sensorFusion.GetOrientation().GetEulerAngles<Axis_Y, Axis_X, Axis_Z, Rotate_CW, Handed_R>(&yaw, &pitch, &roll);
3639
3740 // convert each angle to degrees
3841 yaw = glm::degrees(yaw);
3942 pitch = glm::degrees(pitch);
4043 roll = glm::degrees(roll);
44+#endif
4145 }
4246

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t