MCPcopy Create free account
hub / github.com/LibreVR/Revive / TrackpadToDPad

Method TrackpadToDPad

ReviveXR/InputManager.cpp:376–390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

374}
375
376ovrButton InputManager::InputDevice::TrackpadToDPad(ovrVector2f trackpad)
377{
378 if (trackpad.y < trackpad.x) {
379 if (trackpad.y < -trackpad.x)
380 return ovrButton_Down;
381 else
382 return ovrButton_Right;
383 }
384 else {
385 if (trackpad.y < -trackpad.x)
386 return ovrButton_Left;
387 else
388 return ovrButton_Up;
389 }
390}
391
392InputManager::OculusTouch::OculusTouch(XrInstance instance)
393 : InputDevice(instance, "touch", "Oculus Touch")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected