Monado OpenXR Runtime
|
A single HMD or input device. More...
#include <xrt/xrt_device.h>
Data Fields | |
enum xrt_device_name | name |
Enum identifier of the device. More... | |
char | str [XRT_DEVICE_NAME_LEN] |
A string describing the device. More... | |
struct xrt_hmd_parts * | hmd |
Null if this device does not interface with the users head. More... | |
struct xrt_tracking_origin * | tracking_origin |
Always set, pointing to the tracking system for this device. More... | |
size_t | num_inputs |
Number of inputs. More... | |
struct xrt_input * | inputs |
Array of input structs. More... | |
size_t | num_outputs |
Number of outputs. More... | |
struct xrt_output * | outputs |
Array of output structs. More... | |
void(* | update_inputs )(struct xrt_device *xdev, struct time_state *timekeeping) |
Update any attached inputs. More... | |
void(* | get_tracked_pose )(struct xrt_device *xdev, enum xrt_input_name name, struct time_state *timekeeping, int64_t *out_timestamp, struct xrt_space_relation *out_relation) |
Get relationship of a tracked device to the device "base space". More... | |
void(* | set_output )(struct xrt_device *xdev, enum xrt_output_name name, struct time_state *timekeeping, union xrt_output_value *value) |
Set a output value. More... | |
void(* | get_view_pose )(struct xrt_device *xdev, struct xrt_vec3 *eye_relation, uint32_t view_index, struct xrt_pose *out_pose) |
Get the per view pose in relation to the view space. More... | |
void(* | destroy )(struct xrt_device *xdev) |
Destroy device. More... | |
A single HMD or input device.
void(* xrt_device::destroy) (struct xrt_device *xdev) |
Destroy device.
void(* xrt_device::get_tracked_pose) (struct xrt_device *xdev, enum xrt_input_name name, struct time_state *timekeeping, int64_t *out_timestamp, struct xrt_space_relation *out_relation) |
Get relationship of a tracked device to the device "base space".
Right now the base space is assumed to be local space.
This is very very WIP and will need to be made a lot more advanced.
[in] | xdev | The device. |
[in] | name | Some devices may have multiple poses on them, select the one using this field. For HMDs use XRT_INPUT_GENERIC_HEAD_POSE . |
[in] | timekeeping | Shared time synchronization struct. |
[out] | out_timestamp | Timestamp when this relation was captured. |
[out] | out_relation | The relation read from the device. |
void(* xrt_device::get_view_pose) (struct xrt_device *xdev, struct xrt_vec3 *eye_relation, uint32_t view_index, struct xrt_pose *out_pose) |
Get the per view pose in relation to the view space.
Does not do any device level tracking, use get_tracked_pose for that.
eye_relation | The interpupillary relation as a 3D position, most simple stereo devices would just want to set out_puse->position.[x|y|z] = ipd.[x|y|z] / 2.0f. Not to be confused with IPD that is absolute distance, this is a full 3D relation. |
index | Index of view. |
out_pose | Output pose, see ipd argument, and in addition orientation most likely identity rotation. |
struct xrt_hmd_parts* xrt_device::hmd |
Null if this device does not interface with the users head.
Referenced by u_device_free(), and u_device_setup_split_side_by_side().
struct xrt_input* xrt_device::inputs |
Array of input structs.
Referenced by oxr_xdev_find_input().
enum xrt_device_name xrt_device::name |
Enum identifier of the device.
Referenced by oxr_find_profile_for_device().
size_t xrt_device::num_inputs |
Number of inputs.
Referenced by oxr_xdev_find_input().
size_t xrt_device::num_outputs |
Number of outputs.
Referenced by oxr_xdev_find_output().
struct xrt_output* xrt_device::outputs |
Array of output structs.
Referenced by oxr_xdev_find_output().
void(* xrt_device::set_output) (struct xrt_device *xdev, enum xrt_output_name name, struct time_state *timekeeping, union xrt_output_value *value) |
Set a output value.
char xrt_device::str[XRT_DEVICE_NAME_LEN] |
A string describing the device.
Referenced by oxr_system_get_properties().
struct xrt_tracking_origin* xrt_device::tracking_origin |
Always set, pointing to the tracking system for this device.
Referenced by oxr_session_get_view_pose_at().
void(* xrt_device::update_inputs) (struct xrt_device *xdev, struct time_state *timekeeping) |
Update any attached inputs.
[in] | xdev | The device. |
[in] | timekeeping | Shared time synchronization struct. |