The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

xrt: Add xrt_device::ref_space_usage function

+36
+36
src/xrt/include/xrt/xrt_device.h
··· 262 262 bool hand_tracking_supported; 263 263 bool eye_gaze_supported; 264 264 bool force_feedback_supported; 265 + bool ref_space_usage_supported; 265 266 bool form_factor_check_supported; 266 267 267 268 ··· 418 419 struct xrt_visibility_mask **out_mask); 419 420 420 421 /*! 422 + * Called by the @ref xrt_space_overseer when a reference space that is 423 + * implemented by this device is first used, or when the last usage of 424 + * the reference space stops. 425 + * 426 + * What is provided is both the @ref xrt_reference_space_type that 427 + * triggered the usage change and the @ref xrt_input_name (if any) that 428 + * is used to drive the space. 429 + * 430 + * @see xrt_space_overseer_ref_space_inc 431 + * @see xrt_space_overseer_ref_space_dec 432 + * @see xrt_input_name 433 + * @see xrt_reference_space_type 434 + */ 435 + xrt_result_t (*ref_space_usage)(struct xrt_device *xdev, 436 + enum xrt_reference_space_type type, 437 + enum xrt_input_name name, 438 + bool used); 439 + 440 + /*! 421 441 * @brief Check if given form factor is available or not. 422 442 * 423 443 * This should only be used in HMD device, if the device driver supports form factor check. ··· 543 563 struct xrt_visibility_mask **out_mask) 544 564 { 545 565 return xdev->get_visibility_mask(xdev, type, view_index, out_mask); 566 + } 567 + 568 + /*! 569 + * Helper function for @ref xrt_device::ref_space_usage. 570 + * 571 + * @copydoc xrt_device::ref_space_usage 572 + * 573 + * @public @memberof xrt_device 574 + */ 575 + static inline xrt_result_t 576 + xrt_device_ref_space_usage(struct xrt_device *xdev, 577 + enum xrt_reference_space_type type, 578 + enum xrt_input_name name, 579 + bool used) 580 + { 581 + return xdev->ref_space_usage(xdev, type, name, used); 546 582 } 547 583 548 584 /*!