mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-27 10:10:17 +00:00
a/bindings,xrt: Add FB_touch_controller_proximity
Adding virtual profiles is a bit of a hack that we may want to unify in the future. It also adds some redundant verification for paths like "/user/hand/left/input/trigger" Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
This commit is contained in:
parent
d0a6fc2c3c
commit
ab2e89affd
|
@ -413,6 +413,9 @@ endif()
|
|||
if(NOT DEFINED XRT_FEATURE_OPENXR_INTERACTION_VIVE_FOCUS3)
|
||||
set(XRT_FEATURE_OPENXR_INTERACTION_VIVE_FOCUS3 ON)
|
||||
endif()
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_INTERACTION_FB_PROXIMITY)
|
||||
set(XRT_FEATURE_OPENXR_INTERACTION_FB_PROXIMITY ON)
|
||||
endif()
|
||||
|
||||
# Defaults for OpenXR layer support
|
||||
if(NOT DEFINED XRT_FEATURE_OPENXR_LAYER_DEPTH)
|
||||
|
|
|
@ -74,6 +74,7 @@ EXTENSIONS = (
|
|||
['XR_FB_composition_layer_depth_test', 'XRT_FEATURE_OPENXR_LAYER_FB_DEPTH_TEST'],
|
||||
['XR_FB_display_refresh_rate', 'XRT_FEATURE_OPENXR_DISPLAY_REFRESH_RATE'],
|
||||
['XR_FB_passthrough', 'XRT_FEATURE_OPENXR_LAYER_PASSTHROUGH'],
|
||||
['XR_FB_touch_controller_proximity', 'XRT_FEATURE_OPENXR_INTERACTION_FB_PROXIMITY'],
|
||||
['XR_HTC_facial_tracking', 'XRT_FEATURE_OPENXR_FACIAL_TRACKING_HTC'],
|
||||
['XR_ML_ml2_controller_interaction', 'XRT_FEATURE_OPENXR_INTERACTION_ML2'],
|
||||
['XR_MND_headless', 'XRT_FEATURE_OPENXR_HEADLESS'],
|
||||
|
|
|
@ -141,6 +141,70 @@
|
|||
}
|
||||
},
|
||||
|
||||
"/virtual_profiles/oculus/touch_controller_proximity_fb": {
|
||||
"title": "Oculus Touch Controller Proximity Extension",
|
||||
"type": "tracked_controller",
|
||||
"monado_device": "XRT_DEVICE_TOUCH_CONTROLLER",
|
||||
"extension": "FB_touch_controller_proximity",
|
||||
"subaction_paths": [
|
||||
"/user/hand/left",
|
||||
"/user/hand/right"
|
||||
],
|
||||
"subpaths": {
|
||||
"/input/trigger": {
|
||||
"type": "button",
|
||||
"localized_name": "Trigger",
|
||||
"components": ["proximity_fb"],
|
||||
"monado_bindings": {
|
||||
"proximity_fb": "XRT_INPUT_TOUCH_TRIGGER_PROXIMITY"
|
||||
}
|
||||
},
|
||||
"/input/thumb_fb": {
|
||||
"type": "button",
|
||||
"localized_name": "Thumb",
|
||||
"components": ["proximity_fb"],
|
||||
"monado_bindings": {
|
||||
"proximity_fb": "XRT_INPUT_TOUCH_THUMB_PROXIMITY"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"/virtual_profiles/oculus/touch_controller_proximity_1_1": {
|
||||
"title": "Oculus Touch Controller Proximity OpenXR 1.1",
|
||||
"type": "tracked_controller",
|
||||
"monado_device": "XRT_DEVICE_TOUCH_CONTROLLER",
|
||||
"openxr_version": {
|
||||
"promoted": {
|
||||
"major": "1",
|
||||
"minor": "1"
|
||||
}
|
||||
},
|
||||
"subaction_paths": [
|
||||
"/user/hand/left",
|
||||
"/user/hand/right"
|
||||
],
|
||||
"subpaths": {
|
||||
"/input/trigger": {
|
||||
"type": "button",
|
||||
"localized_name": "Trigger",
|
||||
"components": ["proximity"],
|
||||
"monado_bindings": {
|
||||
"proximity": "XRT_INPUT_TOUCH_TRIGGER_PROXIMITY"
|
||||
}
|
||||
},
|
||||
"/input/thumb_resting_surfaces": {
|
||||
"type": "button",
|
||||
"localized_name": "Thumb",
|
||||
"components": ["proximity"],
|
||||
"monado_bindings": {
|
||||
"proximity": "XRT_INPUT_TOUCH_THUMB_PROXIMITY"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
"/interaction_profiles/ext/hand_interaction_ext": {
|
||||
"title": "Ext Hand Interaction",
|
||||
"type": "tracked_controller",
|
||||
|
@ -786,7 +850,7 @@
|
|||
"type": "tracked_controller",
|
||||
"steamvr_controllertype": "oculus_touch",
|
||||
"monado_device": "XRT_DEVICE_TOUCH_CONTROLLER",
|
||||
"extended_by": ["ext/palm_pose", "grip_surface", "ext/hand_interaction_poses"],
|
||||
"extended_by": ["ext/palm_pose", "grip_surface", "ext/hand_interaction_poses", "oculus/touch_controller_proximity_fb", "oculus/touch_controller_proximity_1_1"],
|
||||
"subaction_paths": [
|
||||
"/user/hand/left",
|
||||
"/user/hand/right"
|
||||
|
|
|
@ -604,7 +604,7 @@ def generate_bindings_c(file, b):
|
|||
|
||||
# @todo Doesn't handle pose yet.
|
||||
steamvr_path = component.steamvr_path
|
||||
if component.component_name in ["click", "touch", "force", "value"]:
|
||||
if component.component_name in ["click", "touch", "force", "value", "proximity"]:
|
||||
steamvr_path += "/" + component.component_name
|
||||
|
||||
f.write(f'\t\t\t{{ // binding_template {idx}\n')
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#cmakedefine XRT_FEATURE_OPENXR_INTERACTION_BYTEDANCE
|
||||
#cmakedefine XRT_FEATURE_OPENXR_INTERACTION_VIVE_COSMOS
|
||||
#cmakedefine XRT_FEATURE_OPENXR_INTERACTION_VIVE_FOCUS3
|
||||
#cmakedefine XRT_FEATURE_OPENXR_INTERACTION_FB_PROXIMITY
|
||||
#cmakedefine XRT_FEATURE_OPENXR_LAYER_COLOR_SCALE_BIAS
|
||||
#cmakedefine XRT_FEATURE_OPENXR_LAYER_CUBE
|
||||
#cmakedefine XRT_FEATURE_OPENXR_LAYER_CYLINDER
|
||||
|
|
|
@ -1021,6 +1021,8 @@ enum xrt_input_type
|
|||
_(XRT_INPUT_TOUCH_THUMBREST_TOUCH , XRT_INPUT_NAME(0x00D0, BOOLEAN)) \
|
||||
_(XRT_INPUT_TOUCH_GRIP_POSE , XRT_INPUT_NAME(0x00D1, POSE)) \
|
||||
_(XRT_INPUT_TOUCH_AIM_POSE , XRT_INPUT_NAME(0x00D2, POSE)) \
|
||||
_(XRT_INPUT_TOUCH_TRIGGER_PROXIMITY , XRT_INPUT_NAME(0x00D3, BOOLEAN)) \
|
||||
_(XRT_INPUT_TOUCH_THUMB_PROXIMITY , XRT_INPUT_NAME(0x00D4, BOOLEAN)) \
|
||||
\
|
||||
_(XRT_INPUT_HAND_SELECT_VALUE , XRT_INPUT_NAME(0x00E0, VEC1_ZERO_TO_ONE)) \
|
||||
_(XRT_INPUT_HAND_SQUEEZE_VALUE , XRT_INPUT_NAME(0x00E1, VEC1_ZERO_TO_ONE)) \
|
||||
|
|
|
@ -486,6 +486,18 @@
|
|||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* XR_FB_touch_controller_proximity
|
||||
*/
|
||||
#if defined(XR_FB_touch_controller_proximity) && defined(XRT_FEATURE_OPENXR_INTERACTION_FB_PROXIMITY)
|
||||
#define OXR_HAVE_FB_touch_controller_proximity
|
||||
#define OXR_EXTENSION_SUPPORT_FB_touch_controller_proximity(_) \
|
||||
_(FB_touch_controller_proximity, FB_TOUCH_CONTROLLER_PROXIMITY)
|
||||
#else
|
||||
#define OXR_EXTENSION_SUPPORT_FB_touch_controller_proximity(_)
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* XR_HTC_facial_tracking
|
||||
*/
|
||||
|
@ -744,6 +756,7 @@
|
|||
OXR_EXTENSION_SUPPORT_FB_composition_layer_depth_test(_) \
|
||||
OXR_EXTENSION_SUPPORT_FB_display_refresh_rate(_) \
|
||||
OXR_EXTENSION_SUPPORT_FB_passthrough(_) \
|
||||
OXR_EXTENSION_SUPPORT_FB_touch_controller_proximity(_) \
|
||||
OXR_EXTENSION_SUPPORT_HTC_facial_tracking(_) \
|
||||
OXR_EXTENSION_SUPPORT_ML_ml2_controller_interaction(_) \
|
||||
OXR_EXTENSION_SUPPORT_MND_headless(_) \
|
||||
|
|
Loading…
Reference in a new issue