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 { ...@@ -28,7 +28,7 @@ enum class OpenXrInteractionProfileType {
kHTCVive = 4, kHTCVive = 4,
kSamsungOdyssey = 5, kSamsungOdyssey = 5,
kHPReverbG2 = 6, kHPReverbG2 = 6,
kHandSelect = 7, kHandSelectGrasp = 7,
kCount = 8, kCount = 8,
}; };
...@@ -119,8 +119,8 @@ constexpr const char* kSamsungOdysseyInputProfiles[] = { ...@@ -119,8 +119,8 @@ constexpr const char* kSamsungOdysseyInputProfiles[] = {
constexpr const char* kHPReverbG2InputProfiles[] = { constexpr const char* kHPReverbG2InputProfiles[] = {
"hp-mixed-reality", "oculus-touch", "generic-trigger-squeeze"}; "hp-mixed-reality", "oculus-touch", "generic-trigger-squeeze"};
constexpr const char* kGenericHandSelectInputProfile[] = { constexpr const char* kGenericHandSelectGraspInputProfile[] = {
"generic-hand-select"}; "generic-hand-select-grasp", "generic-hand-select"};
constexpr OpenXrButtonPathMap kMicrosoftMotionControllerButtonPathMaps[] = { constexpr OpenXrButtonPathMap kMicrosoftMotionControllerButtonPathMaps[] = {
{OpenXrButtonType::kTrigger, {OpenXrButtonType::kTrigger,
...@@ -279,10 +279,13 @@ constexpr OpenXrButtonPathMap kHPReverbG2RightControllerButtonPathMaps[] = { ...@@ -279,10 +279,13 @@ constexpr OpenXrButtonPathMap kHPReverbG2RightControllerButtonPathMaps[] = {
1}, 1},
}; };
constexpr OpenXrButtonPathMap kGenericHandSelectButtonPathMaps[] = { constexpr OpenXrButtonPathMap kGenericHandSelectGraspButtonPathMaps[] = {
{OpenXrButtonType::kTrigger, {OpenXrButtonType::kTrigger,
{{OpenXrButtonActionType::kValue, "/input/select/value"}}, {{OpenXrButtonActionType::kValue, "/input/select/value"}},
1}, 1},
{OpenXrButtonType::kTrigger,
{{OpenXrButtonActionType::kValue, "/input/squeeze/value"}},
1},
}; };
constexpr OpenXrAxisPathMap kMicrosoftMotionControllerAxisPathMaps[] = { constexpr OpenXrAxisPathMap kMicrosoftMotionControllerAxisPathMaps[] = {
...@@ -408,16 +411,16 @@ constexpr OpenXrControllerInteractionProfile kHPReverbG2InteractionProfile = { ...@@ -408,16 +411,16 @@ constexpr OpenXrControllerInteractionProfile kHPReverbG2InteractionProfile = {
constexpr OpenXrControllerInteractionProfile constexpr OpenXrControllerInteractionProfile
kHandInteractionMSFTInteractionProfile = { kHandInteractionMSFTInteractionProfile = {
OpenXrInteractionProfileType::kHandSelect, OpenXrInteractionProfileType::kHandSelectGrasp,
"/interaction_profiles/microsoft/hand_interaction", "/interaction_profiles/microsoft/hand_interaction",
kMSFTHandInteractionExtensionName, kMSFTHandInteractionExtensionName,
GamepadMapping::kNone, GamepadMapping::kNone,
kGenericHandSelectInputProfile, kGenericHandSelectGraspInputProfile,
base::size(kGenericHandSelectInputProfile), base::size(kGenericHandSelectGraspInputProfile),
kGenericHandSelectButtonPathMaps, kGenericHandSelectGraspButtonPathMaps,
base::size(kGenericHandSelectButtonPathMaps), base::size(kGenericHandSelectGraspButtonPathMaps),
kGenericHandSelectButtonPathMaps, kGenericHandSelectGraspButtonPathMaps,
base::size(kGenericHandSelectButtonPathMaps), base::size(kGenericHandSelectGraspButtonPathMaps),
nullptr, nullptr,
0}; 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