The open source OpenXR runtime
0
fork

Configure Feed

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

u/builders: Refactor space overseer creation helper

+106 -20
+10 -5
src/xrt/auxiliary/util/u_builders.c
··· 143 143 } 144 144 145 145 void 146 - u_builder_create_space_overseer(struct xrt_system_devices *xsysd, struct xrt_space_overseer **out_xso) 146 + u_builder_create_space_overseer_legacy(struct xrt_device *head, 147 + struct xrt_device *left, 148 + struct xrt_device *right, 149 + struct xrt_device **xdevs, 150 + uint32_t xdev_count, 151 + struct xrt_space_overseer **out_xso) 147 152 { 148 153 /* 149 154 * Tracking origins. ··· 156 161 }; 157 162 158 163 u_builder_setup_tracking_origins( // 159 - xsysd->roles.head, // 160 - xsysd->roles.left, // 161 - xsysd->roles.right, // 164 + head, // 165 + left, // 166 + right, // 162 167 &global_tracking_origin_offset); // 163 168 164 169 ··· 171 176 struct xrt_pose T_stage_local = XRT_POSE_IDENTITY; 172 177 T_stage_local.position.y = 1.6; 173 178 174 - u_space_overseer_legacy_setup(uso, xsysd->xdevs, xsysd->xdev_count, xsysd->roles.head, &T_stage_local); 179 + u_space_overseer_legacy_setup(uso, xdevs, xdev_count, head, &T_stage_local); 175 180 176 181 *out_xso = (struct xrt_space_overseer *)uso; 177 182 }
+10 -3
src/xrt/auxiliary/util/u_builders.h
··· 90 90 struct xrt_vec3 *global_tracking_origin_offset); 91 91 92 92 /*! 93 - * Create a legacy space overseer, most builders probably want to have more 94 - * smart then this especially stand alone ones. 93 + * Create a legacy space overseer, most builders probably want to have a more 94 + * advanced setup then this, especially stand alone ones. Uses 95 + * @ref u_builder_setup_tracking_origins internally and 96 + * @ref u_space_overseer_legacy_setup. 95 97 * 96 98 * @ingroup aux_util 97 99 */ 98 100 void 99 - u_builder_create_space_overseer(struct xrt_system_devices *xsysd, struct xrt_space_overseer **out_xso); 101 + u_builder_create_space_overseer_legacy(struct xrt_device *head, 102 + struct xrt_device *left, 103 + struct xrt_device *right, 104 + struct xrt_device **xdevs, 105 + uint32_t xdev_count, 106 + struct xrt_space_overseer **out_xso); 100 107 101 108 102 109 #ifdef __cplusplus
+7 -1
src/xrt/targets/common/target_builder_legacy.c
··· 190 190 */ 191 191 192 192 *out_xsysd = xsysd; 193 - u_builder_create_space_overseer(xsysd, out_xso); 193 + u_builder_create_space_overseer_legacy( // 194 + head, // head 195 + left, // left 196 + right, // right 197 + xsysd->xdevs, // xdevs 198 + xsysd->xdev_count, // xdev_count 199 + out_xso); // out_xso 194 200 195 201 return XRT_SUCCESS; 196 202 }
+7 -1
src/xrt/targets/common/target_builder_lighthouse.c
··· 806 806 xsysd->roles.hand_tracking.right = right_ht; 807 807 808 808 *out_xsysd = xsysd; 809 - u_builder_create_space_overseer(xsysd, out_xso); 809 + u_builder_create_space_overseer_legacy( // 810 + head, // head 811 + left, // left 812 + right, // right 813 + xsysd->xdevs, // xdevs 814 + xsysd->xdev_count, // xdev_count 815 + out_xso); // out_xso 810 816 811 817 return XRT_SUCCESS; 812 818
+7 -1
src/xrt/targets/common/target_builder_north_star.c
··· 588 588 end: 589 589 if (result == XRT_SUCCESS) { 590 590 *out_xsysd = xsysd; 591 - u_builder_create_space_overseer(xsysd, out_xso); 591 + u_builder_create_space_overseer_legacy( // 592 + head_wrap, // head 593 + left, // left 594 + right, // right 595 + xsysd->xdevs, // xdevs 596 + xsysd->xdev_count, // xdev_count 597 + out_xso); // out_xso 592 598 } else { 593 599 xrt_system_devices_destroy(&xsysd); 594 600 }
+7 -1
src/xrt/targets/common/target_builder_nreal_air.c
··· 149 149 */ 150 150 151 151 *out_xsysd = xsysd; 152 - u_builder_create_space_overseer(xsysd, out_xso); 152 + u_builder_create_space_overseer_legacy( // 153 + na_device, // head 154 + NULL, // left 155 + NULL, // right 156 + xsysd->xdevs, // xdevs 157 + xsysd->xdev_count, // xdev_count 158 + out_xso); // out_xso 153 159 154 160 return XRT_SUCCESS; 155 161
+7 -1
src/xrt/targets/common/target_builder_qwerty.c
··· 113 113 */ 114 114 115 115 *out_xsysd = xsysd; 116 - u_builder_create_space_overseer(xsysd, out_xso); 116 + u_builder_create_space_overseer_legacy( // 117 + head, // head 118 + left, // left 119 + right, // right 120 + xsysd->xdevs, // xdevs 121 + xsysd->xdev_count, // xdev_count 122 + out_xso); // out_xso 117 123 118 124 return XRT_SUCCESS; 119 125 }
+7 -1
src/xrt/targets/common/target_builder_remote.c
··· 94 94 } 95 95 96 96 *out_xsysd = xsysd; 97 - u_builder_create_space_overseer(xsysd, out_xso); 97 + u_builder_create_space_overseer_legacy( // 98 + xsysd->roles.head, // head 99 + xsysd->roles.left, // left 100 + xsysd->roles.right, // right 101 + xsysd->xdevs, // xdevs 102 + xsysd->xdev_count, // xdev_count 103 + out_xso); // out_xso 98 104 99 105 return xret; 100 106 }
+8 -1
src/xrt/targets/common/target_builder_rgb_tracking.c
··· 421 421 */ 422 422 423 423 *out_xsysd = xsysd; 424 - u_builder_create_space_overseer(xsysd, out_xso); 424 + u_builder_create_space_overseer_legacy( // 425 + head, // head 426 + left, // left 427 + right, // right 428 + xsysd->xdevs, // xdevs 429 + xsysd->xdev_count, // xdev_count 430 + out_xso); // out_xso 431 + 425 432 426 433 return XRT_SUCCESS; 427 434 }
+7 -1
src/xrt/targets/common/target_builder_rift_s.c
··· 203 203 */ 204 204 205 205 *out_xsysd = xsysd; 206 - u_builder_create_space_overseer(xsysd, out_xso); 206 + u_builder_create_space_overseer_legacy( // 207 + hmd_xdev, // head 208 + left_xdev, // left 209 + right_xdev, // right 210 + xsysd->xdevs, // xdevs 211 + xsysd->xdev_count, // xdev_count 212 + out_xso); // out_xso 207 213 208 214 209 215 unlock_and_fail:
+7 -1
src/xrt/targets/common/target_builder_simulated.c
··· 145 145 */ 146 146 147 147 *out_xsysd = xsysd; 148 - u_builder_create_space_overseer(xsysd, out_xso); 148 + u_builder_create_space_overseer_legacy( // 149 + head, // head 150 + left, // left 151 + right, // right 152 + xsysd->xdevs, // xdevs 153 + xsysd->xdev_count, // xdev_count 154 + out_xso); // out_xso 149 155 150 156 return XRT_SUCCESS; 151 157 }
+7 -1
src/xrt/targets/common/target_builder_simulavr.c
··· 226 226 end: 227 227 if (result == XRT_SUCCESS) { 228 228 *out_xsysd = xsysd; 229 - u_builder_create_space_overseer(xsysd, out_xso); 229 + u_builder_create_space_overseer_legacy( // 230 + head_device, // head 231 + NULL, // left 232 + NULL, // right 233 + xsysd->xdevs, // xdevs 234 + xsysd->xdev_count, // xdev_count 235 + out_xso); // out_xso 230 236 } else { 231 237 xrt_system_devices_destroy(&xsysd); 232 238 }
+8 -1
src/xrt/targets/common/target_builder_wmr.c
··· 307 307 xsysd->roles.hand_tracking.left = ht_left; 308 308 xsysd->roles.hand_tracking.right = ht_right; 309 309 310 + 310 311 // Create space overseer last once all devices set. 311 312 struct xrt_space_overseer *xso = NULL; 312 - u_builder_create_space_overseer(xsysd, &xso); 313 + u_builder_create_space_overseer_legacy( // 314 + head, // head 315 + left, // left 316 + right, // right 317 + xsysd->xdevs, // xdevs 318 + xsysd->xdev_count, // xdev_count 319 + &xso); // out_xso 313 320 assert(xso != NULL); 314 321 315 322
+7 -1
src/xrt/targets/sdl_test/sdl_instance.c
··· 113 113 sp->xsysd_base.xdev_count = 1; 114 114 sp->xsysd_base.roles.head = head; 115 115 116 - u_builder_create_space_overseer(&sp->xsysd_base, &sp->xso); 116 + u_builder_create_space_overseer_legacy( // 117 + head, // head 118 + NULL, // left 119 + NULL, // right 120 + sp->xsysd_base.xdevs, // xdevs 121 + sp->xsysd_base.xdev_count, // xdev_count 122 + &sp->xso); // out_xso 117 123 } 118 124 119 125 void