|
Monado OpenXR Runtime
|
A body tracker, owns the policy for selecting which device and body-tracking source back a single OpenXR body-tracker handle (XrBodyTrackerFB / XrBodyTrackerBD). More...
#include <xrt/xrt_body_tracker.h>
Static Public Member Functions | |
| static xrt_result_t | xrt_body_tracker_locate (struct xrt_body_tracker *xbt, struct xrt_space_overseer *xso, struct xrt_space *base_space, const struct xrt_pose *base_offset, int64_t at_timestamp_ns, struct xrt_body_tracker_location *out_location) |
| Locate the tracked body joints. | |
| static XRT_NONNULL_ALL xrt_result_t | xrt_body_tracker_get_skeleton (struct xrt_body_tracker *xbt, struct xrt_body_skeleton *out_skeleton) |
| Get the body skeleton (the joint hierarchy and rest pose) for this tracker's body-tracking source. | |
| static XRT_NONNULL_ALL xrt_result_t | xrt_body_tracker_reset_calibration_meta (struct xrt_body_tracker *xbt) |
| Reset the body-tracking calibration, for XR_META_body_tracking_calibration. | |
| static XRT_NONNULL_ALL xrt_result_t | xrt_body_tracker_set_calibration_override_meta (struct xrt_body_tracker *xbt, float body_height) |
| Suggest a body-tracking calibration override, for XR_META_body_tracking_calibration. | |
| static XRT_NONNULL_ALL xrt_result_t | xrt_body_tracker_set_fidelity_meta (struct xrt_body_tracker *xbt, enum xrt_body_tracking_fidelity_meta fidelity) |
| Request a body-tracking fidelity level, for XR_META_body_tracking_fidelity. | |
| static XRT_NONNULL_ALL void | xrt_body_tracker_destroy (struct xrt_body_tracker **xbt_ptr) |
| Destroy an xrt_body_tracker - helper function. | |
Data Fields | |
| struct xrt_body_tracker_supported | supported |
| Capability flags for this tracker; see xrt_body_tracker_supported. | |
| xrt_result_t(* | locate )(struct xrt_body_tracker *xbt, struct xrt_space_overseer *xso, struct xrt_space *base_space, const struct xrt_pose *base_offset, int64_t at_timestamp_ns, struct xrt_body_tracker_location *out_location) |
| Locate the tracked body joints. | |
| xrt_result_t(* | get_skeleton )(struct xrt_body_tracker *xbt, struct xrt_body_skeleton *out_skeleton) |
| Get the body skeleton (the joint hierarchy and rest pose) for this tracker's body-tracking source. | |
| xrt_result_t(* | reset_calibration_meta )(struct xrt_body_tracker *xbt) |
| Reset the body-tracking calibration, for XR_META_body_tracking_calibration. | |
| xrt_result_t(* | set_calibration_override_meta )(struct xrt_body_tracker *xbt, float body_height) |
| Suggest a body-tracking calibration override, for XR_META_body_tracking_calibration. | |
| xrt_result_t(* | set_fidelity_meta )(struct xrt_body_tracker *xbt, enum xrt_body_tracking_fidelity_meta fidelity) |
| Request a body-tracking fidelity level, for XR_META_body_tracking_fidelity. | |
| void(* | destroy )(struct xrt_body_tracker *xbt) |
| Destroy this body tracker. | |
A body tracker, owns the policy for selecting which device and body-tracking source back a single OpenXR body-tracker handle (XrBodyTrackerFB / XrBodyTrackerBD).
Created from an xrt_system_devices (see xrt_system_devices::create_body_tracker). The OpenXR state tracker holds one of these per body-tracker handle instead of reaching into an xrt_device directly, mirroring xrt_hand_tracker. This moves device/source selection and the base-space transform (in locate) to the service side of the IPC layer, and lets external runtimes provide different body-tracking behavior without changing the OpenXR code. Implementations may change which xrt_device backs a tracker over its lifetime (for example when the body-tracking role changes); the interface allows that, though not every implementation must support runtime switching. The FB, META full-body and BD (PICO) variants are selected via xrt_body_tracker_create_info::body_tracking_type.
|
inlinestatic |
Destroy an xrt_body_tracker - helper function.
| [in,out] | xbt_ptr | A pointer to the xrt_body_tracker struct pointer. |
Will destroy the tracker if *xbt_ptr is not NULL. Will then set *xbt_ptr to NULL.
References destroy.
Referenced by ipc_server_objects_destroy_xbt().
|
inlinestatic |
Get the body skeleton (the joint hierarchy and rest pose) for this tracker's body-tracking source.
| xbt | Pointer to self. |
| out_skeleton | Resulting skeleton. |
References get_skeleton.
|
inlinestatic |
Locate the tracked body joints.
| xbt | Pointer to self. |
| xso | Space overseer used to resolve the base space. |
| base_space | Space to locate the body in. |
| base_offset | Offset applied on top of base_space. |
| at_timestamp_ns | Time to locate at. |
| out_location | Resulting raw joint set plus the body pose resolved into the base space, see xrt_body_tracker_location. |
References locate.
|
inlinestatic |
Reset the body-tracking calibration, for XR_META_body_tracking_calibration.
| xbt | Pointer to self. |
References reset_calibration_meta.
|
inlinestatic |
Suggest a body-tracking calibration override, for XR_META_body_tracking_calibration.
| xbt | Pointer to self. |
| body_height | Suggested body height, in meters. |
References set_calibration_override_meta.
|
inlinestatic |
Request a body-tracking fidelity level, for XR_META_body_tracking_fidelity.
| xbt | Pointer to self. |
| fidelity | Requested fidelity level. |
References set_fidelity_meta.
| void(* xrt_body_tracker::destroy) (struct xrt_body_tracker *xbt) |
Destroy this body tracker.
Code consuming this interface should use xrt_body_tracker_destroy.
| xbt | Pointer to self. |
Referenced by u_body_tracker_populate_function_pointers(), and xrt_body_tracker_destroy().
| xrt_result_t(* xrt_body_tracker::get_skeleton) (struct xrt_body_tracker *xbt, struct xrt_body_skeleton *out_skeleton) |
Get the body skeleton (the joint hierarchy and rest pose) for this tracker's body-tracking source.
| xbt | Pointer to self. |
| out_skeleton | Resulting skeleton. |
Referenced by u_body_tracker_populate_function_pointers(), and xrt_body_tracker_get_skeleton().
| xrt_result_t(* xrt_body_tracker::locate) (struct xrt_body_tracker *xbt, struct xrt_space_overseer *xso, struct xrt_space *base_space, const struct xrt_pose *base_offset, int64_t at_timestamp_ns, struct xrt_body_tracker_location *out_location) |
Locate the tracked body joints.
| xbt | Pointer to self. |
| xso | Space overseer used to resolve the base space. |
| base_space | Space to locate the body in. |
| base_offset | Offset applied on top of base_space. |
| at_timestamp_ns | Time to locate at. |
| out_location | Resulting raw joint set plus the body pose resolved into the base space, see xrt_body_tracker_location. |
Referenced by u_body_tracker_populate_function_pointers(), and xrt_body_tracker_locate().
| xrt_result_t(* xrt_body_tracker::reset_calibration_meta) (struct xrt_body_tracker *xbt) |
Reset the body-tracking calibration, for XR_META_body_tracking_calibration.
| xbt | Pointer to self. |
Referenced by u_body_tracker_populate_function_pointers(), and xrt_body_tracker_reset_calibration_meta().
| xrt_result_t(* xrt_body_tracker::set_calibration_override_meta) (struct xrt_body_tracker *xbt, float body_height) |
Suggest a body-tracking calibration override, for XR_META_body_tracking_calibration.
| xbt | Pointer to self. |
| body_height | Suggested body height, in meters. |
Referenced by u_body_tracker_populate_function_pointers(), and xrt_body_tracker_set_calibration_override_meta().
| xrt_result_t(* xrt_body_tracker::set_fidelity_meta) (struct xrt_body_tracker *xbt, enum xrt_body_tracking_fidelity_meta fidelity) |
Request a body-tracking fidelity level, for XR_META_body_tracking_fidelity.
| xbt | Pointer to self. |
| fidelity | Requested fidelity level. |
Referenced by u_body_tracker_populate_function_pointers(), and xrt_body_tracker_set_fidelity_meta().
| struct xrt_body_tracker_supported xrt_body_tracker::supported |
Capability flags for this tracker; see xrt_body_tracker_supported.