The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

u/space_overseer: Make it possible set root as unbounded

authored by

Niharika Challapalli and committed by
Jakob Bornecrantz
428c5119 613d08eb

+23 -3
+9 -1
src/xrt/auxiliary/util/u_builders.c
··· 150 150 struct xrt_device *right, 151 151 struct xrt_device **xdevs, 152 152 uint32_t xdev_count, 153 + bool root_is_unbounded, 153 154 struct xrt_space_overseer **out_xso) 154 155 { 155 156 /* ··· 178 179 struct xrt_pose T_stage_local = XRT_POSE_IDENTITY; 179 180 T_stage_local.position.y = 1.6; 180 181 181 - u_space_overseer_legacy_setup(uso, xdevs, xdev_count, head, &T_stage_local); 182 + u_space_overseer_legacy_setup( // 183 + uso, // uso 184 + xdevs, // xdevs 185 + xdev_count, // xdev_count 186 + head, // head 187 + &T_stage_local, // local_offset 188 + root_is_unbounded); // root_is_unbounded 182 189 183 190 *out_xso = (struct xrt_space_overseer *)uso; 184 191 } ··· 240 247 ubrh.right, // right 241 248 xsysd->xdevs, // xdevs 242 249 xsysd->xdev_count, // xdev_count 250 + false, // root_is_unbounded 243 251 out_xso); // out_xso 244 252 245 253 return XRT_SUCCESS;
+1
src/xrt/auxiliary/util/u_builders.h
··· 173 173 struct xrt_device *right, 174 174 struct xrt_device **xdevs, 175 175 uint32_t xdev_count, 176 + bool root_is_unbounded, 176 177 struct xrt_space_overseer **out_xso); 177 178 178 179 /*!
+9 -1
src/xrt/auxiliary/util/u_space_overseer.c
··· 775 775 struct xrt_device **xdevs, 776 776 uint32_t xdev_count, 777 777 struct xrt_device *head, 778 - const struct xrt_pose *local_offset) 778 + const struct xrt_pose *local_offset, 779 + bool root_is_unbounded) 779 780 { 780 781 struct xrt_space *root = uso->base.semantic.root; // Convenience 781 782 ··· 810 811 assert(uso->base.semantic.view == NULL); 811 812 assert(uso->base.semantic.stage == NULL); 812 813 assert(uso->base.semantic.local == NULL); 814 + assert(uso->base.semantic.unbounded == NULL); 813 815 xrt_space_reference(&uso->base.semantic.view, NULL); 814 816 xrt_space_reference(&uso->base.semantic.stage, NULL); 815 817 xrt_space_reference(&uso->base.semantic.local, NULL); 818 + xrt_space_reference(&uso->base.semantic.unbounded, NULL); 816 819 817 820 // Assume the root space is the center of the stage space. 818 821 xrt_space_reference(&uso->base.semantic.stage, uso->base.semantic.root); 822 + 823 + // If the system wants to support the space, set root as unbounded. 824 + if (root_is_unbounded) { 825 + xrt_space_reference(&uso->base.semantic.unbounded, uso->base.semantic.root); 826 + } 819 827 820 828 // Set local to the local offset. 821 829 u_space_overseer_create_offset_space(uso, uso->base.semantic.root, local_offset, &uso->base.semantic.local);
+2 -1
src/xrt/auxiliary/util/u_space_overseer.h
··· 48 48 struct xrt_device **xdevs, 49 49 uint32_t xdev_count, 50 50 struct xrt_device *head, 51 - const struct xrt_pose *local_offset); 51 + const struct xrt_pose *local_offset, 52 + bool root_is_unbounded); 52 53 53 54 /*! 54 55 * Creates a space without any offset, this is just for optimisation over a
+1
src/xrt/targets/common/target_builder_steamvr.c
··· 175 175 right, // right 176 176 xsysd->xdevs, // xdevs 177 177 xsysd->xdev_count, // xdev_count 178 + false, // root_is_unbounded 178 179 out_xso); // out_xso 179 180 180 181 return XRT_SUCCESS;
+1
src/xrt/targets/sdl_test/sdl_instance.c
··· 152 152 NULL, // right 153 153 sp->xsysd_base.xdevs, // xdevs 154 154 sp->xsysd_base.xdev_count, // xdev_count 155 + false, // root_is_unbounded 155 156 &sp->xso); // out_xso 156 157 } 157 158