@@ -68,34 +68,31 @@ bool OpenXRHandInteractionExtension::is_available() {
6868 return available;
6969}
7070
71- void OpenXRHandInteractionExtension::on_register_metadata () {
72- OpenXRInteractionProfileMetadata *openxr_metadata = OpenXRInteractionProfileMetadata::get_singleton ();
73- ERR_FAIL_NULL (openxr_metadata);
74-
71+ void OpenXRHandInteractionExtension::on_register_metadata (OpenXRInteractionProfileMetadata *p_interaction_profile_metadata) {
7572 // Hand interaction profile.
7673 const String profile_path = " /interaction_profiles/ext/hand_interaction_ext" ;
77- openxr_metadata ->register_interaction_profile (" Hand interaction" , profile_path, XR_EXT_HAND_INTERACTION_EXTENSION_NAME );
74+ p_interaction_profile_metadata ->register_interaction_profile (" Hand interaction" , profile_path, XR_EXT_HAND_INTERACTION_EXTENSION_NAME );
7875 for (const String user_path : { " /user/hand/left" , " /user/hand/right" }) {
79- openxr_metadata ->register_io_path (profile_path, " Grip pose" , user_path, user_path + " /input/grip/pose" , " " , OpenXRAction::OPENXR_ACTION_POSE );
80- openxr_metadata ->register_io_path (profile_path, " Aim pose" , user_path, user_path + " /input/aim/pose" , " " , OpenXRAction::OPENXR_ACTION_POSE );
81- openxr_metadata ->register_io_path (profile_path, " Pinch pose" , user_path, user_path + " /input/pinch_ext/pose" , " " , OpenXRAction::OPENXR_ACTION_POSE );
82- openxr_metadata ->register_io_path (profile_path, " Poke pose" , user_path, user_path + " /input/poke_ext/pose" , " " , OpenXRAction::OPENXR_ACTION_POSE );
83- openxr_metadata ->register_io_path (profile_path, " Grip surface pose" , user_path, user_path + " /input/grip_surface/pose" , XR_EXT_PALM_POSE_EXTENSION_NAME " ," XR_KHR_MAINTENANCE1_EXTENSION_NAME " ," XR_OPENXR_1_1_NAME , OpenXRAction::OPENXR_ACTION_POSE );
76+ p_interaction_profile_metadata ->register_io_path (profile_path, " Grip pose" , user_path, user_path + " /input/grip/pose" , " " , OpenXRAction::OPENXR_ACTION_POSE );
77+ p_interaction_profile_metadata ->register_io_path (profile_path, " Aim pose" , user_path, user_path + " /input/aim/pose" , " " , OpenXRAction::OPENXR_ACTION_POSE );
78+ p_interaction_profile_metadata ->register_io_path (profile_path, " Pinch pose" , user_path, user_path + " /input/pinch_ext/pose" , " " , OpenXRAction::OPENXR_ACTION_POSE );
79+ p_interaction_profile_metadata ->register_io_path (profile_path, " Poke pose" , user_path, user_path + " /input/poke_ext/pose" , " " , OpenXRAction::OPENXR_ACTION_POSE );
80+ p_interaction_profile_metadata ->register_io_path (profile_path, " Grip surface pose" , user_path, user_path + " /input/grip_surface/pose" , XR_EXT_PALM_POSE_EXTENSION_NAME " ," XR_KHR_MAINTENANCE1_EXTENSION_NAME " ," XR_OPENXR_1_1_NAME , OpenXRAction::OPENXR_ACTION_POSE );
8481
85- openxr_metadata ->register_io_path (profile_path, " Pinch" , user_path, user_path + " /input/pinch_ext/value" , " " , OpenXRAction::OPENXR_ACTION_FLOAT );
86- openxr_metadata ->register_io_path (profile_path, " Pinch ready" , user_path, user_path + " /input/pinch_ext/ready_ext" , " " , OpenXRAction::OPENXR_ACTION_BOOL );
82+ p_interaction_profile_metadata ->register_io_path (profile_path, " Pinch" , user_path, user_path + " /input/pinch_ext/value" , " " , OpenXRAction::OPENXR_ACTION_FLOAT );
83+ p_interaction_profile_metadata ->register_io_path (profile_path, " Pinch ready" , user_path, user_path + " /input/pinch_ext/ready_ext" , " " , OpenXRAction::OPENXR_ACTION_BOOL );
8784
88- openxr_metadata ->register_io_path (profile_path, " Aim activate" , user_path, user_path + " /input/aim_activate_ext/value" , " " , OpenXRAction::OPENXR_ACTION_FLOAT );
89- openxr_metadata ->register_io_path (profile_path, " Aim activate ready" , user_path, user_path + " /input/aim_activate_ext/ready_ext" , " " , OpenXRAction::OPENXR_ACTION_BOOL );
85+ p_interaction_profile_metadata ->register_io_path (profile_path, " Aim activate" , user_path, user_path + " /input/aim_activate_ext/value" , " " , OpenXRAction::OPENXR_ACTION_FLOAT );
86+ p_interaction_profile_metadata ->register_io_path (profile_path, " Aim activate ready" , user_path, user_path + " /input/aim_activate_ext/ready_ext" , " " , OpenXRAction::OPENXR_ACTION_BOOL );
9087
91- openxr_metadata ->register_io_path (profile_path, " Grasp" , user_path, user_path + " /input/grasp_ext/value" , " " , OpenXRAction::OPENXR_ACTION_FLOAT );
92- openxr_metadata ->register_io_path (profile_path, " Grasp ready" , user_path, user_path + " /input/grasp_ext/ready_ext" , " " , OpenXRAction::OPENXR_ACTION_BOOL );
88+ p_interaction_profile_metadata ->register_io_path (profile_path, " Grasp" , user_path, user_path + " /input/grasp_ext/value" , " " , OpenXRAction::OPENXR_ACTION_FLOAT );
89+ p_interaction_profile_metadata ->register_io_path (profile_path, " Grasp ready" , user_path, user_path + " /input/grasp_ext/ready_ext" , " " , OpenXRAction::OPENXR_ACTION_BOOL );
9390
9491 // Hand tracking microgestures.
95- openxr_metadata ->register_io_path (profile_path, " Swipe left" , user_path, user_path + " /input/swipe_left_meta/click" , " XR_META_hand_tracking_microgestures" , OpenXRAction::OPENXR_ACTION_BOOL );
96- openxr_metadata ->register_io_path (profile_path, " Swipe right" , user_path, user_path + " /input/swipe_right_meta/click" , " XR_META_hand_tracking_microgestures" , OpenXRAction::OPENXR_ACTION_BOOL );
97- openxr_metadata ->register_io_path (profile_path, " Swipe forward" , user_path, user_path + " /input/swipe_forward_meta/click" , " XR_META_hand_tracking_microgestures" , OpenXRAction::OPENXR_ACTION_BOOL );
98- openxr_metadata ->register_io_path (profile_path, " Swipe backward" , user_path, user_path + " /input/swipe_backward_meta/click" , " XR_META_hand_tracking_microgestures" , OpenXRAction::OPENXR_ACTION_BOOL );
99- openxr_metadata ->register_io_path (profile_path, " Tap thumb" , user_path, user_path + " /input/tap_thumb_meta/click" , " XR_META_hand_tracking_microgestures" , OpenXRAction::OPENXR_ACTION_BOOL );
92+ p_interaction_profile_metadata ->register_io_path (profile_path, " Swipe left" , user_path, user_path + " /input/swipe_left_meta/click" , " XR_META_hand_tracking_microgestures" , OpenXRAction::OPENXR_ACTION_BOOL );
93+ p_interaction_profile_metadata ->register_io_path (profile_path, " Swipe right" , user_path, user_path + " /input/swipe_right_meta/click" , " XR_META_hand_tracking_microgestures" , OpenXRAction::OPENXR_ACTION_BOOL );
94+ p_interaction_profile_metadata ->register_io_path (profile_path, " Swipe forward" , user_path, user_path + " /input/swipe_forward_meta/click" , " XR_META_hand_tracking_microgestures" , OpenXRAction::OPENXR_ACTION_BOOL );
95+ p_interaction_profile_metadata ->register_io_path (profile_path, " Swipe backward" , user_path, user_path + " /input/swipe_backward_meta/click" , " XR_META_hand_tracking_microgestures" , OpenXRAction::OPENXR_ACTION_BOOL );
96+ p_interaction_profile_metadata ->register_io_path (profile_path, " Tap thumb" , user_path, user_path + " /input/tap_thumb_meta/click" , " XR_META_hand_tracking_microgestures" , OpenXRAction::OPENXR_ACTION_BOOL );
10097 }
10198}
0 commit comments