14 #define CHECK_XR(call, error_msg) \
16 XrResult _res = call; \
17 if (XR_FAILED(_res)) { \
18 throw GHOST_XrException(error_msg, _res); \
27 #define CHECK_XR_ASSERT(call) \
29 XrResult _res = call; \
30 assert(_res == XR_SUCCESS); \
38 r_oxr_pose.position.x = ghost_pose.position[0];
39 r_oxr_pose.position.y = ghost_pose.position[1];
40 r_oxr_pose.position.z = ghost_pose.position[2];
41 r_oxr_pose.orientation.w = ghost_pose.orientation_quat[0];
42 r_oxr_pose.orientation.x = ghost_pose.orientation_quat[1];
43 r_oxr_pose.orientation.y = ghost_pose.orientation_quat[2];
44 r_oxr_pose.orientation.z = ghost_pose.orientation_quat[3];
50 r_ghost_pose.position[0] = oxr_pose.position.x;
51 r_ghost_pose.position[1] = oxr_pose.position.y;
52 r_ghost_pose.position[2] = oxr_pose.position.z;
53 r_ghost_pose.orientation_quat[0] = oxr_pose.orientation.w;
54 r_ghost_pose.orientation_quat[1] = oxr_pose.orientation.x;
55 r_ghost_pose.orientation_quat[2] = oxr_pose.orientation.y;
56 r_ghost_pose.orientation_quat[3] = oxr_pose.orientation.z;
void copy_openxr_pose_to_ghost_pose(const XrPosef &oxr_pose, GHOST_XrPose &r_ghost_pose)
void copy_ghost_pose_to_openxr_pose(const GHOST_XrPose &ghost_pose, XrPosef &r_oxr_pose)