Showing the changes to interface/src/OculusManager.cpp (1 of 3 files). Show all
Unified · Split
| @@ -16,6 +16,7 @@ Ptr<SensorDevice> OculusManager::_sensorDevice; · 15 unmodified lines | ||
| 16 | 16 | SensorFusion OculusManager::_sensorFusion; |
| 17 | 17 | |
| 18 | 18 | void OculusManager::connect() { |
| 19 | +#ifdef __APPLE__ | |
| 19 | 20 | System::Init(); |
| 20 | 21 | _deviceManager = *DeviceManager::Create(); |
| 21 | 22 | _hmdDevice = *_deviceManager->EnumerateDevices<HMDDevice>().CreateDevice(); |
| @@ -29,14 +30,17 @@ void OculusManager::connect() { · 7 unmodified lines | ||
| 29 | 30 | // default the yaw to the current orientation |
| 30 | 31 | _sensorFusion.SetMagReference(); |
| 31 | 32 | } |
| 33 | +#endif | |
| 32 | 34 | } |
| 33 | 35 | |
| 34 | 36 | void OculusManager::getEulerAngles(float& yaw, float& pitch, float& roll) { |
| 37 | +#ifdef __APPLE__ | |
| 35 | 38 | _sensorFusion.GetOrientation().GetEulerAngles<Axis_Y, Axis_X, Axis_Z, Rotate_CW, Handed_R>(&yaw, &pitch, &roll); |
| 36 | 39 | |
| 37 | 40 | // convert each angle to degrees |
| 38 | 41 | yaw = glm::degrees(yaw); |
| 39 | 42 | pitch = glm::degrees(pitch); |
| 40 | 43 | roll = glm::degrees(roll); |
| 44 | +#endif | |
| 41 | 45 | } |
| 42 | 46 | |