Monado OpenXR Runtime
Loading...
Searching...
No Matches
xrt_body_tracker Struct Reference

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>

Collaboration diagram for xrt_body_tracker:

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.
 

Detailed Description

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.

Member Function Documentation

◆ xrt_body_tracker_destroy()

static XRT_NONNULL_ALL void xrt_body_tracker_destroy ( struct xrt_body_tracker **  xbt_ptr)
inlinestatic

Destroy an xrt_body_tracker - helper function.

Parameters
[in,out]xbt_ptrA 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().

◆ xrt_body_tracker_get_skeleton()

static XRT_NONNULL_ALL xrt_result_t xrt_body_tracker_get_skeleton ( struct xrt_body_tracker xbt,
struct xrt_body_skeleton out_skeleton 
)
inlinestatic

Get the body skeleton (the joint hierarchy and rest pose) for this tracker's body-tracking source.

Parameters
xbtPointer to self.
out_skeletonResulting skeleton.

References get_skeleton.

◆ xrt_body_tracker_locate()

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 
)
inlinestatic

Locate the tracked body joints.

Parameters
xbtPointer to self.
xsoSpace overseer used to resolve the base space.
base_spaceSpace to locate the body in.
base_offsetOffset applied on top of base_space.
at_timestamp_nsTime to locate at.
out_locationResulting raw joint set plus the body pose resolved into the base space, see xrt_body_tracker_location.

References locate.

◆ xrt_body_tracker_reset_calibration_meta()

static XRT_NONNULL_ALL xrt_result_t xrt_body_tracker_reset_calibration_meta ( struct xrt_body_tracker xbt)
inlinestatic

Reset the body-tracking calibration, for XR_META_body_tracking_calibration.

Parameters
xbtPointer to self.

References reset_calibration_meta.

◆ xrt_body_tracker_set_calibration_override_meta()

static XRT_NONNULL_ALL xrt_result_t xrt_body_tracker_set_calibration_override_meta ( struct xrt_body_tracker xbt,
float  body_height 
)
inlinestatic

Suggest a body-tracking calibration override, for XR_META_body_tracking_calibration.

Parameters
xbtPointer to self.
body_heightSuggested body height, in meters.

References set_calibration_override_meta.

◆ xrt_body_tracker_set_fidelity_meta()

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 
)
inlinestatic

Request a body-tracking fidelity level, for XR_META_body_tracking_fidelity.

Parameters
xbtPointer to self.
fidelityRequested fidelity level.

References set_fidelity_meta.

Field Documentation

◆ destroy

void(* xrt_body_tracker::destroy) (struct xrt_body_tracker *xbt)

Destroy this body tracker.

Code consuming this interface should use xrt_body_tracker_destroy.

Parameters
xbtPointer to self.

Referenced by u_body_tracker_populate_function_pointers(), and xrt_body_tracker_destroy().

◆ get_skeleton

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.

Parameters
xbtPointer to self.
out_skeletonResulting skeleton.

Referenced by u_body_tracker_populate_function_pointers(), and xrt_body_tracker_get_skeleton().

◆ locate

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.

Parameters
xbtPointer to self.
xsoSpace overseer used to resolve the base space.
base_spaceSpace to locate the body in.
base_offsetOffset applied on top of base_space.
at_timestamp_nsTime to locate at.
out_locationResulting 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().

◆ reset_calibration_meta

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.

Parameters
xbtPointer to self.

Referenced by u_body_tracker_populate_function_pointers(), and xrt_body_tracker_reset_calibration_meta().

◆ set_calibration_override_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.

Parameters
xbtPointer to self.
body_heightSuggested body height, in meters.

Referenced by u_body_tracker_populate_function_pointers(), and xrt_body_tracker_set_calibration_override_meta().

◆ set_fidelity_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.

Parameters
xbtPointer to self.
fidelityRequested fidelity level.

Referenced by u_body_tracker_populate_function_pointers(), and xrt_body_tracker_set_fidelity_meta().

◆ supported

struct xrt_body_tracker_supported xrt_body_tracker::supported

Capability flags for this tracker; see xrt_body_tracker_supported.


The documentation for this struct was generated from the following file: