Commit 4ebe1fc9 authored by Lachlan Ford's avatar Lachlan Ford Committed by Commit Bot

OpenXR generic-hand-select-grasp input profile implementation

Implemented the genric-hand-select-grasp input profile on top of OpenXR
using the XR_MSFT_hand_interaction interaction profile

Change-Id: I31f9899d004700328186da5023eb1026f21a8989
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2533235Reviewed-by: default avatarBrandon Jones <bajones@chromium.org>
Commit-Queue: Lachlan Ford <laford@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#829965}
parent 56bd680c
......@@ -28,7 +28,7 @@ enum class OpenXrInteractionProfileType {
kHTCVive = 4,
kSamsungOdyssey = 5,
kHPReverbG2 = 6,
kHandSelect = 7,
kHandSelectGrasp = 7,
kCount = 8,
};
......@@ -119,8 +119,8 @@ constexpr const char* kSamsungOdysseyInputProfiles[] = {
constexpr const char* kHPReverbG2InputProfiles[] = {
"hp-mixed-reality", "oculus-touch", "generic-trigger-squeeze"};
constexpr const char* kGenericHandSelectInputProfile[] = {
"generic-hand-select"};
constexpr const char* kGenericHandSelectGraspInputProfile[] = {
"generic-hand-select-grasp", "generic-hand-select"};
constexpr OpenXrButtonPathMap kMicrosoftMotionControllerButtonPathMaps[] = {
{OpenXrButtonType::kTrigger,
......@@ -279,10 +279,13 @@ constexpr OpenXrButtonPathMap kHPReverbG2RightControllerButtonPathMaps[] = {
1},
};
constexpr OpenXrButtonPathMap kGenericHandSelectButtonPathMaps[] = {
constexpr OpenXrButtonPathMap kGenericHandSelectGraspButtonPathMaps[] = {
{OpenXrButtonType::kTrigger,
{{OpenXrButtonActionType::kValue, "/input/select/value"}},
1},
{OpenXrButtonType::kTrigger,
{{OpenXrButtonActionType::kValue, "/input/squeeze/value"}},
1},
};
constexpr OpenXrAxisPathMap kMicrosoftMotionControllerAxisPathMaps[] = {
......@@ -408,16 +411,16 @@ constexpr OpenXrControllerInteractionProfile kHPReverbG2InteractionProfile = {
constexpr OpenXrControllerInteractionProfile
kHandInteractionMSFTInteractionProfile = {
OpenXrInteractionProfileType::kHandSelect,
OpenXrInteractionProfileType::kHandSelectGrasp,
"/interaction_profiles/microsoft/hand_interaction",
kMSFTHandInteractionExtensionName,
GamepadMapping::kNone,
kGenericHandSelectInputProfile,
base::size(kGenericHandSelectInputProfile),
kGenericHandSelectButtonPathMaps,
base::size(kGenericHandSelectButtonPathMaps),
kGenericHandSelectButtonPathMaps,
base::size(kGenericHandSelectButtonPathMaps),
kGenericHandSelectGraspInputProfile,
base::size(kGenericHandSelectGraspInputProfile),
kGenericHandSelectGraspButtonPathMaps,
base::size(kGenericHandSelectGraspButtonPathMaps),
kGenericHandSelectGraspButtonPathMaps,
base::size(kGenericHandSelectGraspButtonPathMaps),
nullptr,
0};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment