The open source OpenXR runtime
0
fork

Configure Feed

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

st/oxr: Only access space velocity through chain helper

authored by

Jakob Bornecrantz and committed by
Jakob Bornecrantz
587d26bb 85a2abae

+4 -2
+4 -2
src/xrt/state_trackers/oxr/oxr_space.c
··· 20 20 #include "oxr_objects.h" 21 21 #include "oxr_logger.h" 22 22 #include "oxr_handle.h" 23 + #include "oxr_chain.h" 23 24 24 25 25 26 const struct xrt_pose origin = XRT_POSE_IDENTITY; ··· 437 438 print_space_slog(&slog, "baseSpace", baseSpc); 438 439 } 439 440 441 + // Used in a lot of places. 442 + XrSpaceVelocity *vel = OXR_GET_OUTPUT_FROM_CHAIN(location->next, XR_TYPE_SPACE_LOCATION, XrSpaceVelocity); 443 + 440 444 // Get the pure space relation. 441 445 struct xrt_space_relation pure; 442 446 bool has_pure_relation = get_pure_space_relation(log, spc, baseSpc, time, &pure); ··· 445 449 446 450 OXR_XRT_POSE_TO_XRPOSEF(XRT_POSE_IDENTITY, location->pose); 447 451 448 - XrSpaceVelocity *vel = (XrSpaceVelocity *)location->next; 449 452 if (vel) { 450 453 vel->velocityFlags = 0; 451 454 U_ZERO(&vel->linearVelocity); ··· 474 477 OXR_XRT_POSE_TO_XRPOSEF(result.pose, location->pose); 475 478 location->locationFlags = xrt_to_xr_space_location_flags(result.relation_flags); 476 479 477 - XrSpaceVelocity *vel = (XrSpaceVelocity *)location->next; 478 480 if (vel) { 479 481 vel->velocityFlags = 0; 480 482 if ((result.relation_flags & XRT_SPACE_RELATION_LINEAR_VELOCITY_VALID_BIT) != 0) {