The open source OpenXR runtime
0
fork

Configure Feed

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

t/hand: Apply formatting

+27 -23
+2 -1
src/xrt/tracking/hand/mercury/hg_interface.h
··· 21 21 * @ingroup aux_tracking 22 22 */ 23 23 struct t_hand_tracking_sync * 24 - t_hand_tracking_sync_mercury_create(struct t_stereo_camera_calibration *calib, enum hand_tracking_output_space output_space); 24 + t_hand_tracking_sync_mercury_create(struct t_stereo_camera_calibration *calib, 25 + enum hand_tracking_output_space output_space); 25 26 26 27 #ifdef __cplusplus 27 28 } // extern "C"
+12 -10
src/xrt/tracking/hand/mercury/hg_sync.cpp
··· 258 258 .040f * .5f; // Measured my wrist thickness with calipers 259 259 } 260 260 261 - static bool handle_changed_image_size(HandTracking *htd, xrt_size &new_one_view_size) 261 + static bool 262 + handle_changed_image_size(HandTracking *htd, xrt_size &new_one_view_size) 262 263 { 263 264 int gcd_calib = std::gcd(htd->calibration_one_view_size_px.h, htd->calibration_one_view_size_px.w); 264 265 int gcd_new = std::gcd(new_one_view_size.h, new_one_view_size.w); 265 266 266 - int lcm_h_calib = htd->calibration_one_view_size_px.h/gcd_calib; 267 - int lcm_w_calib = htd->calibration_one_view_size_px.w/gcd_calib; 267 + int lcm_h_calib = htd->calibration_one_view_size_px.h / gcd_calib; 268 + int lcm_w_calib = htd->calibration_one_view_size_px.w / gcd_calib; 268 269 269 - int lcm_h_new = new_one_view_size.h/gcd_new; 270 - int lcm_w_new = new_one_view_size.w/gcd_new; 270 + int lcm_h_new = new_one_view_size.h / gcd_new; 271 + int lcm_w_new = new_one_view_size.w / gcd_new; 271 272 272 273 bool good = (lcm_h_calib == lcm_h_new) && (lcm_w_calib == lcm_w_new); 273 274 274 275 if (!good) { 275 - HT_WARN(htd, "Can't process this frame, wrong aspect ratio. What we wanted: %dx%d, what we got: %dx%d", lcm_h_calib, lcm_w_calib, lcm_h_new, lcm_w_new); 276 + HT_WARN(htd, "Can't process this frame, wrong aspect ratio. What we wanted: %dx%d, what we got: %dx%d", 277 + lcm_h_calib, lcm_w_calib, lcm_h_new, lcm_w_new); 276 278 return false; 277 279 } 278 280 279 - htd->multiply_px_coord_for_undistort = (float)htd->calibration_one_view_size_px.h/(float)new_one_view_size.h; 281 + htd->multiply_px_coord_for_undistort = (float)htd->calibration_one_view_size_px.h / (float)new_one_view_size.h; 280 282 htd->last_frame_one_view_size_px = new_one_view_size; 281 283 return true; 282 284 } ··· 343 345 assert(left_frame->height == right_frame->height); 344 346 345 347 const int full_height = left_frame->height; 346 - const int full_width = left_frame->width*2; 348 + const int full_width = left_frame->width * 2; 347 349 348 - if ((left_frame->width != (uint32_t)htd->last_frame_one_view_size_px.w) || (left_frame->height != (uint32_t)htd->last_frame_one_view_size_px.h)) 349 - { 350 + if ((left_frame->width != (uint32_t)htd->last_frame_one_view_size_px.w) || 351 + (left_frame->height != (uint32_t)htd->last_frame_one_view_size_px.h)) { 350 352 xrt_size new_one_view_size; 351 353 new_one_view_size.h = left_frame->height; 352 354 new_one_view_size.w = left_frame->width;
+1 -1
src/xrt/tracking/hand/mercury/hg_sync.hpp
··· 150 150 cv::Mat run_model_on_this; 151 151 cv::Mat debug_out_to_this; 152 152 153 - struct det_output det_outputs[2]; // left, right 153 + struct det_output det_outputs[2]; // left, right 154 154 struct keypoint_estimation_run_info run_info[2]; 155 155 156 156 struct keypoint_output keypoint_outputs[2];
+1 -1
src/xrt/tracking/hand/old_rgb/rgb_interface.h
··· 21 21 * @ingroup aux_tracking 22 22 */ 23 23 struct t_hand_tracking_sync * 24 - t_hand_tracking_sync_old_rgb_create(struct t_stereo_camera_calibration * calib); 24 + t_hand_tracking_sync_old_rgb_create(struct t_stereo_camera_calibration *calib); 25 25 26 26 27 27 #ifdef __cplusplus
+10 -9
src/xrt/tracking/hand/old_rgb/rgb_sync.cpp
··· 458 458 htd->one_view_size_px.w = wrap.view[0].image_size_pixels.w; 459 459 htd->one_view_size_px.h = wrap.view[0].image_size_pixels.h; 460 460 461 - U_LOG_E("%d %d %p %p", htd->one_view_size_px.w, htd->one_view_size_px.h, 462 - (void *)&htd->one_view_size_px.w, (void *)&htd->one_view_size_px.h); 461 + U_LOG_E("%d %d %p %p", htd->one_view_size_px.w, htd->one_view_size_px.h, (void *)&htd->one_view_size_px.w, 462 + (void *)&htd->one_view_size_px.h); 463 463 464 464 465 465 ··· 733 733 uint64_t timestamp, 734 734 struct xrt_hand_joint_set *out_left, 735 735 struct xrt_hand_joint_set *out_right, 736 - uint64_t *out_timestamp_ns) 736 + uint64_t *out_timestamp_ns) 737 737 { 738 738 739 739 os_mutex_lock(&htd->openxr_hand_data_mediator); ··· 805 805 struct xrt_frame *right_frame, 806 806 struct xrt_hand_joint_set *out_left_hand, 807 807 struct xrt_hand_joint_set *out_right_hand, 808 - uint64_t *out_timestamp_ns) 808 + uint64_t *out_timestamp_ns) 809 809 { 810 810 XRT_TRACE_MARKER(); 811 811 ··· 827 827 assert(left_frame->height == right_frame->height); 828 828 829 829 const int full_height = left_frame->height; 830 - const int full_width = left_frame->width*2; 830 + const int full_width = left_frame->width * 2; 831 831 832 832 const int view_width = htd->one_view_size_px.w; 833 833 const int view_height = htd->one_view_size_px.h; ··· 1002 1002 htd->histories_3d[past_indices[i]].last_hands_unfiltered.push_back( 1003 1003 hands_unfiltered[present_indices[i]]); 1004 1004 } 1005 - // The preceding may not do anything, because we'll start out with no hand histories! All the numbers of elements 1006 - // should be zero. 1005 + // The preceding may not do anything, because we'll start out with no hand histories! All the numbers of 1006 + // elements should be zero. 1007 1007 1008 1008 1009 1009 for (size_t i = 0; i < present_hands_taken.size(); i++) { ··· 1189 1189 applyJointWidths(put_in_set); 1190 1190 applyJointOrientations(put_in_set, xr_indices[i]); 1191 1191 } 1192 - htExitFrame(htd, false, final_hands_ordered_by_handedness, filtered_hands[0].timestamp, out_left_hand, out_right_hand, out_timestamp_ns); 1192 + htExitFrame(htd, false, final_hands_ordered_by_handedness, filtered_hands[0].timestamp, out_left_hand, 1193 + out_right_hand, out_timestamp_ns); 1193 1194 } 1194 1195 1195 1196 void ··· 1216 1217 1217 1218 auto htd = new HandTracking(); 1218 1219 1219 - U_LOG_E("htd is at %p", (void*)htd); 1220 + U_LOG_E("htd is at %p", (void *)htd); 1220 1221 1221 1222 // Setup logging first. We like logging. 1222 1223 htd->log_level = debug_get_log_option_ht_log();
+1 -1
src/xrt/tracking/hand/old_rgb/rgb_sync.hpp
··· 295 295 struct xrt_frame *right_frame, 296 296 struct xrt_hand_joint_set *out_left_hand, 297 297 struct xrt_hand_joint_set *out_right_hand, 298 - uint64_t *out_timestamp_ns); 298 + uint64_t *out_timestamp_ns); 299 299 300 300 static void 301 301 cCallbackDestroy(t_hand_tracking_sync *ht_sync);