Monado OpenXR Runtime
multi.c File Reference

Combination of multiple xrt_device. More...

#include "math/m_api.h"
#include "math/m_space.h"
#include "util/u_misc.h"
#include "util/u_debug.h"
#include "util/u_device.h"
#include "multi.h"
Include dependency graph for multi.c:

Data Structures

struct  multi_device
 

Macros

#define MULTI_TRACE(d, ...)   U_LOG_XDEV_IFL_T(&d->base, d->log_level, __VA_ARGS__)
 
#define MULTI_DEBUG(d, ...)   U_LOG_XDEV_IFL_D(&d->base, d->log_level, __VA_ARGS__)
 
#define MULTI_INFO(d, ...)   U_LOG_XDEV_IFL_I(&d->base, d->log_level, __VA_ARGS__)
 
#define MULTI_WARN(d, ...)   U_LOG_XDEV_IFL_W(&d->base, d->log_level, __VA_ARGS__)
 
#define MULTI_ERROR(d, ...)   U_LOG_XDEV_IFL_E(&d->base, d->log_level, __VA_ARGS__)
 

Functions

static void direct_override (struct multi_device *d, struct xrt_space_relation *tracker_relation, struct xrt_space_relation *out_relation)
 
static void attached_override (struct multi_device *d, struct xrt_space_relation *target_relation, struct xrt_pose *target_offset, struct xrt_space_relation *tracker_relation, struct xrt_pose *tracker_offset, struct xrt_space_relation *in_target_space, struct xrt_space_relation *out_relation)
 
static void get_tracked_pose (struct xrt_device *xdev, enum xrt_input_name name, uint64_t at_timestamp_ns, struct xrt_space_relation *out_relation)
 
static void destroy (struct xrt_device *xdev)
 
static void get_hand_tracking (struct xrt_device *xdev, enum xrt_input_name name, uint64_t at_timestamp_ns, struct xrt_hand_joint_set *out_value, uint64_t *out_timestamp_ns)
 
static void set_output (struct xrt_device *xdev, enum xrt_output_name name, const union xrt_output_value *value)
 
static void get_view_poses (struct xrt_device *xdev, const struct xrt_vec3 *default_eye_relation, uint64_t at_timestamp_ns, uint32_t view_count, struct xrt_space_relation *out_head_relation, struct xrt_fov *out_fovs, struct xrt_pose *out_poses)
 
static bool compute_distortion (struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *result)
 
static void update_inputs (struct xrt_device *xdev)
 
struct xrt_devicemulti_create_tracking_override (enum xrt_tracking_override_type override_type, struct xrt_device *tracking_override_target, struct xrt_device *tracking_override_tracker, enum xrt_input_name tracking_override_input_name, struct xrt_pose *offset)
 Create a device that takes ownership of the target device and mimics it. More...
 

Detailed Description