Monado OpenXR Runtime
Loading...
Searching...
No Matches
b_tracked_device Struct Reference
Collaboration diagram for b_tracked_device:

Public Member Functions

struct b_tracked_device * b_tracked_device_create (struct xrt_device *xdev, struct xrt_space *space)
 Create a tracked device with a reference to space.
 
void b_tracked_device_reference (struct b_tracked_device **dst, struct b_tracked_device *src)
 
struct xrt_space * b_tracked_device_get_space (struct b_tracked_device *btd)
 Returns the device space without taking a reference.
 
struct xrt_device * b_tracked_device_get_xdev (struct b_tracked_device *btd)
 Returns the device, only to be used for debug printing.
 
void b_tracked_device_track_pose_space_write_locked (struct b_tracked_device *btd, struct xrt_space *xs)
 Track a pose space owned by this device.
 
void b_tracked_device_untrack_pose_space_write_locked (struct b_tracked_device *btd, struct xrt_space *xs)
 Stop tracking a pose space.
 
void b_tracked_device_for_each_pose_space_read_locked (struct b_tracked_device *btd, b_tracked_device_pose_space_cb cb, void *priv)
 Iterate tracked pose spaces.
 
void b_tracked_device_clear_pose_spaces_write_locked (struct b_tracked_device *btd)
 Drop all tracked pose spaces without destroying them.
 

Data Fields

struct xrt_reference reference
 
struct xrt_space * space
 
struct xrt_device * xdev
 Borrowed pointer, only used for debug printing.
 
struct xrt_space ** pose_spaces
 
uint32_t pose_space_count
 
uint32_t pose_space_capacity
 

Member Function Documentation

◆ b_tracked_device_clear_pose_spaces_write_locked()

void b_tracked_device_clear_pose_spaces_write_locked ( struct b_tracked_device *  btd)

Drop all tracked pose spaces without destroying them.

The caller must hold the space overseer graph lock for writing.

◆ b_tracked_device_create()

struct b_tracked_device * b_tracked_device_create ( struct xrt_device *  xdev,
struct xrt_space *  space 
)

Create a tracked device with a reference to space.

The xdev pointer is borrowed and only used for debug printing. The device must be removed from the space overseer before it is destroyed, or the space overseer must be destroyed first.

References U_TYPED_CALLOC, and xdev.

Referenced by link_space_to_device_write_locked().

◆ b_tracked_device_for_each_pose_space_read_locked()

void b_tracked_device_for_each_pose_space_read_locked ( struct b_tracked_device *  btd,
b_tracked_device_pose_space_cb  cb,
void *  priv 
)

Iterate tracked pose spaces.

The caller must hold the space overseer graph lock, for writing if cb modifies the pose spaces.

◆ b_tracked_device_get_space()

struct xrt_space * b_tracked_device_get_space ( struct b_tracked_device *  btd)

Returns the device space without taking a reference.

◆ b_tracked_device_get_xdev()

struct xrt_device * b_tracked_device_get_xdev ( struct b_tracked_device *  btd)

Returns the device, only to be used for debug printing.

References xdev.

◆ b_tracked_device_track_pose_space_write_locked()

void b_tracked_device_track_pose_space_write_locked ( struct b_tracked_device *  btd,
struct xrt_space *  xs 
)

Track a pose space owned by this device.

The caller must hold the space overseer graph lock for writing.

References U_ARRAY_REALLOC_OR_FREE.

◆ b_tracked_device_untrack_pose_space_write_locked()

void b_tracked_device_untrack_pose_space_write_locked ( struct b_tracked_device *  btd,
struct xrt_space *  xs 
)

Stop tracking a pose space.

The caller must hold the space overseer graph lock for writing.

Field Documentation

◆ xdev

struct xrt_device* b_tracked_device::xdev

Borrowed pointer, only used for debug printing.

The device must be removed from the space overseer before it is destroyed, or the space overseer must be destroyed first.

Referenced by b_space_overseer_link_space_to_device(), b_tracked_device_create(), b_tracked_device_get_xdev(), and link_space_to_device_write_locked().


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