mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-29 18:08:29 +00:00
u/space_overseer: stage is null/offset, unless driver provides actual poses
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2280>
This commit is contained in:
parent
9436c36865
commit
eae4472f50
|
@ -936,12 +936,12 @@ u_space_overseer_legacy_setup(struct u_space_overseer *uso,
|
|||
xrt_space_reference(&uso->base.semantic.unbounded, NULL);
|
||||
|
||||
if (head != NULL && head->stage_supported) {
|
||||
// stage space is a pose space
|
||||
// stage poses are polled from the driver
|
||||
u_space_overseer_create_pose_space(uso, head, XRT_INPUT_GENERIC_STAGE_SPACE_POSE,
|
||||
&uso->base.semantic.stage);
|
||||
} else {
|
||||
// Assume the root space is the center of the stage space.
|
||||
xrt_space_reference(&uso->base.semantic.stage, uso->base.semantic.root);
|
||||
// stage offset is managed by space overseer
|
||||
u_space_overseer_create_null_space(uso, uso->base.semantic.root, &uso->base.semantic.stage);
|
||||
}
|
||||
|
||||
// If the system wants to support the space, set root as unbounded.
|
||||
|
|
|
@ -66,11 +66,6 @@ r_hmd_get_tracked_pose(struct xrt_device *xdev,
|
|||
|
||||
switch (name) {
|
||||
case XRT_INPUT_GENERIC_HEAD_POSE: copy_head_center_to_relation(rh, out_relation); break;
|
||||
case XRT_INPUT_GENERIC_STAGE_SPACE_POSE:
|
||||
// STAGE is implicitly defined as the space poses are returned in, therefore STAGE origin is (0, 0, 0).
|
||||
*out_relation = (struct xrt_space_relation)XRT_SPACE_RELATION_ZERO;
|
||||
out_relation->relation_flags = XRT_SPACE_RELATION_BITMASK_ALL;
|
||||
break;
|
||||
default: U_LOG_E("Unknown input name"); break;
|
||||
}
|
||||
}
|
||||
|
@ -154,7 +149,6 @@ r_hmd_create(struct r_hub *r)
|
|||
rh->base.orientation_tracking_supported = true;
|
||||
rh->base.position_tracking_supported = true;
|
||||
rh->base.hand_tracking_supported = false;
|
||||
rh->base.stage_supported = true;
|
||||
rh->base.name = XRT_DEVICE_GENERIC_HMD;
|
||||
rh->base.device_type = XRT_DEVICE_TYPE_HMD;
|
||||
rh->base.inputs[0].name = XRT_INPUT_GENERIC_HEAD_POSE;
|
||||
|
|
|
@ -169,7 +169,6 @@ HmdDevice::HmdDevice(const DeviceBuilder &builder) : Device(builder)
|
|||
this->name = XRT_DEVICE_GENERIC_HMD;
|
||||
this->device_type = XRT_DEVICE_TYPE_HMD;
|
||||
this->container_handle = 0;
|
||||
this->stage_supported = true;
|
||||
|
||||
inputs_vec = {xrt_input{true, 0, XRT_INPUT_GENERIC_HEAD_POSE, {}}};
|
||||
this->inputs = inputs_vec.data();
|
||||
|
@ -420,11 +419,6 @@ HmdDevice::get_tracked_pose(xrt_input_name name, uint64_t at_timestamp_ns, xrt_s
|
|||
{
|
||||
switch (name) {
|
||||
case XRT_INPUT_GENERIC_HEAD_POSE: Device::get_pose(at_timestamp_ns, out_relation); break;
|
||||
case XRT_INPUT_GENERIC_STAGE_SPACE_POSE:
|
||||
// STAGE is implicitly defined as the space poses are returned in, therefore STAGE origin is (0, 0, 0).
|
||||
*out_relation = XRT_SPACE_RELATION_ZERO;
|
||||
out_relation->relation_flags = XRT_SPACE_RELATION_BITMASK_ALL;
|
||||
break;
|
||||
default: U_LOG_W("steamvr_lh hmd: Requested pose for unknown name %u", name); break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -316,7 +316,7 @@ verify_device_name(struct survive_device *survive, enum xrt_input_name name)
|
|||
{
|
||||
|
||||
switch (survive->device_type) {
|
||||
case DEVICE_TYPE_HMD: return name == XRT_INPUT_GENERIC_HEAD_POSE || name == XRT_INPUT_GENERIC_STAGE_SPACE_POSE;
|
||||
case DEVICE_TYPE_HMD: return name == XRT_INPUT_GENERIC_HEAD_POSE;
|
||||
case DEVICE_TYPE_CONTROLLER:
|
||||
return name == XRT_INPUT_INDEX_AIM_POSE || name == XRT_INPUT_INDEX_GRIP_POSE ||
|
||||
name == XRT_INPUT_VIVE_AIM_POSE || name == XRT_INPUT_VIVE_GRIP_POSE ||
|
||||
|
@ -337,13 +337,6 @@ survive_device_get_tracked_pose(struct xrt_device *xdev,
|
|||
return;
|
||||
}
|
||||
|
||||
if (name == XRT_INPUT_GENERIC_STAGE_SPACE_POSE) {
|
||||
// STAGE is implicitly defined as the space poses are returned in, therefore STAGE origin is (0, 0, 0).
|
||||
*out_relation = (struct xrt_space_relation)XRT_SPACE_RELATION_ZERO;
|
||||
out_relation->relation_flags = XRT_SPACE_RELATION_BITMASK_ALL;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!survive->survive_obj) {
|
||||
// U_LOG_D("Obj not set for %p", (void*)survive);
|
||||
return;
|
||||
|
@ -977,7 +970,6 @@ _create_hmd_device(struct survive_system *sys, const struct SurviveSimpleObject
|
|||
survive->base.orientation_tracking_supported = true;
|
||||
survive->base.position_tracking_supported = true;
|
||||
survive->base.device_type = XRT_DEVICE_TYPE_HMD;
|
||||
survive->base.stage_supported = true;
|
||||
|
||||
survive->base.inputs[0].name = XRT_INPUT_GENERIC_HEAD_POSE;
|
||||
|
||||
|
|
Loading…
Reference in a new issue