Monado OpenXR Runtime
u_space_overseer Struct Reference

Default implementation of the xrt_space_overseer object. More...

Collaboration diagram for u_space_overseer:

Static Public Member Functions

static xrt_result_t u_space_overseer_create_offset_space (struct u_space_overseer *uso, struct xrt_space *parent, const struct xrt_pose *offset, struct xrt_space **out_space)
 Create a space with a fixed offset to the parent space. More...
 
static xrt_result_t u_space_overseer_create_pose_space (struct u_space_overseer *uso, struct xrt_device *xdev, enum xrt_input_name name, struct xrt_space **out_space)
 Create a space that wraps the xdev input pose described by input name, implicitly make the device's tracking space the parent of the created space. More...
 

Data Fields

struct xrt_space_overseer base
 
pthread_rwlock_t lock
 Main graph lock. More...
 
struct u_hashmap_intxdev_map
 Map from xdev to space, each entry holds a reference. More...
 
struct xrt_reference ref_space_use [XRT_SPACE_REFERENCE_TYPE_COUNT]
 Tracks usage of reference spaces. More...
 
struct xrt_session_event_sinkbroadcast
 Event sink to broadcast events to all sessions. More...
 
struct xrt_devicenotify
 The notify device, usually the head device. More...
 
bool can_do_local_spaces_recenter
 Can we do a recenter of the local and local_floor spaces, protected by the lock. More...
 

Detailed Description

Default implementation of the xrt_space_overseer object.

Member Function Documentation

◆ u_space_overseer_create_offset_space()

static xrt_result_t u_space_overseer_create_offset_space ( struct u_space_overseer uso,
struct xrt_space parent,
const struct xrt_pose offset,
struct xrt_space **  out_space 
)
inlinestatic

Create a space with a fixed offset to the parent space.

Parameters
[in]xsoOwning space overseer.
[in]parentThe parent space for the new space.
[in]offsetOffset to the space.
[out]out_spaceThe newly created space.

Convenience helper for builder code using u_space_overseer directly.

References xrt_space_overseer::xrt_space_overseer_create_offset_space().

◆ u_space_overseer_create_pose_space()

static xrt_result_t u_space_overseer_create_pose_space ( struct u_space_overseer uso,
struct xrt_device xdev,
enum xrt_input_name  name,
struct xrt_space **  out_space 
)
inlinestatic

Create a space that wraps the xdev input pose described by input name, implicitly make the device's tracking space the parent of the created space.

The name pose_space was chosen because while most input poses are part of the device, they may also be things tracked by the device. The important part is that the space is following the pose, that it happens to be attached to device is coincidental.

Parameters
[in]xsoOwning space overseer.
[in]xdevDevice to get the pose from.
[in]nameName of the pose input.
[out]out_spaceThe newly created space.

Convenience helper for builder code using u_space_overseer directly.

References xrt_space_overseer::xrt_space_overseer_create_pose_space().

Field Documentation

◆ broadcast

struct xrt_session_event_sink* u_space_overseer::broadcast

Event sink to broadcast events to all sessions.

Referenced by u_builder_create_space_overseer_legacy().

◆ can_do_local_spaces_recenter

bool u_space_overseer::can_do_local_spaces_recenter

Can we do a recenter of the local and local_floor spaces, protected by the lock.

This requires that local and local_floor are either null or offset spaces and that they share the same parent.

◆ lock

pthread_rwlock_t u_space_overseer::lock

Main graph lock.

Referenced by u_space_overseer_link_space_to_device().

◆ notify

struct xrt_device* u_space_overseer::notify

The notify device, usually the head device.

Used to notify when reference spaces are used and not used. Must not change during runtime.

◆ ref_space_use

struct xrt_reference u_space_overseer::ref_space_use[XRT_SPACE_REFERENCE_TYPE_COUNT]

Tracks usage of reference spaces.

◆ xdev_map

struct u_hashmap_int* u_space_overseer::xdev_map

Map from xdev to space, each entry holds a reference.


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