mirror of
https://github.com/WiVRn/WiVRn.git
synced 2026-11-21 01:21:38 -08:00
Revert "Remove simple_controller binding for hand interaction"
This reverts commit 1e2823c019.
This commit is contained in:
1 parent
6961485430
commit
c693993748
1 file changed
+17
-2
@@ -571,6 +571,21 @@ make_binding_profiles()
|
||||
constexpr auto controller_per_hand_binding_profiles = std::to_array({make_binding_profiles<0>(),
|
||||
make_binding_profiles<1>()});
|
||||
|
||||
xrt_binding_input_pair hand_interaction_simple_input_binding[] = {
|
||||
{XRT_INPUT_SIMPLE_SELECT_CLICK, XRT_INPUT_HAND_PINCH_VALUE},
|
||||
{XRT_INPUT_SIMPLE_GRIP_POSE, XRT_INPUT_HAND_GRIP_POSE},
|
||||
{XRT_INPUT_SIMPLE_AIM_POSE, XRT_INPUT_HAND_AIM_POSE},
|
||||
};
|
||||
|
||||
xrt_binding_profile hand_interaction_binding_profiles[] = {
|
||||
{
|
||||
.name = XRT_DEVICE_SIMPLE_CONTROLLER,
|
||||
.inputs = hand_interaction_simple_input_binding,
|
||||
.input_count = std::size(hand_interaction_simple_input_binding),
|
||||
.outputs = nullptr,
|
||||
.output_count = 0,
|
||||
},
|
||||
};
|
||||
} // namespace
|
||||
|
||||
wivrn_controller::wivrn_controller(xrt_device_name name,
|
||||
@@ -582,8 +597,8 @@ wivrn_controller::wivrn_controller(xrt_device_name name,
|
||||
.device_type = hand_id == 0 ? XRT_DEVICE_TYPE_LEFT_HAND_CONTROLLER : XRT_DEVICE_TYPE_RIGHT_HAND_CONTROLLER,
|
||||
.hmd = nullptr,
|
||||
.tracking_origin = hmd->tracking_origin,
|
||||
.binding_profile_count = name != XRT_DEVICE_EXT_HAND_INTERACTION ? controller_per_hand_binding_profiles[hand_id].size() : 0,
|
||||
.binding_profiles = name != XRT_DEVICE_EXT_HAND_INTERACTION ? (struct xrt_binding_profile *)controller_per_hand_binding_profiles[hand_id].data() : nullptr,
|
||||
.binding_profile_count = name != XRT_DEVICE_EXT_HAND_INTERACTION ? controller_per_hand_binding_profiles[hand_id].size() : std::size(hand_interaction_binding_profiles),
|
||||
.binding_profiles = name != XRT_DEVICE_EXT_HAND_INTERACTION ? (struct xrt_binding_profile *)controller_per_hand_binding_profiles[hand_id].data() : hand_interaction_binding_profiles,
|
||||
.input_count = WIVRN_CONTROLLER_INPUT_COUNT,
|
||||
.supported = {
|
||||
.orientation_tracking = true,
|
||||
|
||||
Reference in new issue
Block a user