Commit graph

60 commits

Author SHA1 Message Date
Ryan Pavlik b08797a4a5 st/oxr: Fix missing return, resolve warnings 2022-07-14 14:17:35 +00:00
Charlton Rodda aa31ac3789 st/oxr: Implement dpad emulation 2022-05-31 13:25:48 +00:00
Ryan Pavlik a25bb73921 st/oxr: Word choice/clarity 2022-05-17 17:40:58 -05:00
Ryan Pavlik 3e6ec47296 monado: Apply clang-tidy fixes to most of the codebase.
All at least visually inspected, some revised from the auto-fixit
2022-04-13 09:34:54 -05:00
Ryan Pavlik 91c94f015e st/oxr: Fix or silence a number of MSVC warnings 2022-04-12 23:06:11 +00:00
Jakob Bornecrantz 9fd8018a16 st/oxr: Improve space and view debug printing 2022-04-11 20:27:53 +01:00
Jakob Bornecrantz 58daee4752 st/oxr: Remove log argument to oxr_action_get_pose_input function 2022-04-11 18:27:39 +01:00
Christoph Haag 068bf05057 st/oxr: Fix pure_relation_from_space
Fixes in particular the space transform submitted in composition layers
in local reference space.

Consider a pose given with a pose offset to an XrSpace as its origin.
To construct the Pose in global space, simply add up XrSpace pose in
global space, XrSpace pose offset and the given pose.

     Given pose with a
     pose offset to XrSpace as origin
            /|\         /|\
            /            |
           /             |
   XrSpace pose offset   |
         /|\             |
          |              |
          |              |
      XrSpace pose       |
     in global space     |
            /|\          |
             \           |
              \          |
            Global Space origin
2022-03-30 02:03:18 +02:00
Christoph Haag 18376007f9 st/oxr: oxr_space type is now an enum
v2: Get rid of ref_space_type
2022-03-25 18:47:46 +00:00
Christoph Haag 02e5e7be4a st/oxr: Fix getting velocity next struct in xrLocateSpace
fixes 85a2abae
2022-03-25 15:36:14 +01:00
Jakob Bornecrantz b2d2cf3ade st/oxr: Tidy oxr_space_locate 2022-03-15 00:16:17 +00:00
Jakob Bornecrantz 587d26bb45 st/oxr: Only access space velocity through chain helper 2022-03-15 00:16:17 +00:00
Jakob Bornecrantz 85a2abaec6 st/oxr: Refactor pose and fov copies into helpers 2022-03-15 00:16:17 +00:00
Jakob Bornecrantz 1fb5656862 st/oxr: Improve logging in xrLocateSpace 2022-03-15 00:16:17 +00:00
Jakob Bornecrantz 4fc02cf60e st/oxr: Ensure velocities flags and values are zeroed 2022-03-15 00:16:17 +00:00
Jakob Bornecrantz 798932fbf2 st/oxr: Set position to identity and zero velocities if the spaces are locatable 2022-03-15 00:16:17 +00:00
Jakob Bornecrantz 291e795728 st/oxr: Add XRT_CHECK_RESULT to some space functions 2022-03-15 00:16:17 +00:00
Christoph Haag 4501088312 st/oxr: Don't return invalid pose after local space set up 2022-03-11 00:23:12 +01:00
Christoph Haag 075fde3613 st/oxr: propagate a few more space handling return codes 2022-03-03 01:42:02 +01:00
Christoph Haag ed0bd9c244 st/oxr: rework spaces 2022-03-02 17:40:00 +00:00
Christoph Haag f633680506 st/oxr: Fix local[e]_ref_space typo 2022-03-02 17:40:00 +00:00
Ryan Pavlik 9a440d9bce st/oxr: Fix doxygen warning 2022-02-18 21:22:32 +00:00
Christoph Haag 9cd3b47f94 st/oxr: Rework composition of head relation for xrLocateViews 2022-02-16 23:15:28 +00:00
Ryan Pavlik c9889f776f xrt: Rename xrt_space_graph to xrt_relation_chain.
Rename all functions and instances accordingly as well,
and add documentation for all methods.
2022-01-21 19:54:30 +00:00
Ryan Pavlik 3cfaa2ea9f st/oxr: Port to using new zero/identity defines 2021-04-26 22:38:42 +00:00
Jakob Bornecrantz cb51b32ff1 st/oxr: Tidy code
The CHECK_LAYER_TYPE tests would falsely pass on the
IPC layer as it always implements all of the functions.
2021-01-22 14:16:12 +00:00
Christoph Haag 1b597bdd65 st/oxr: Rename sub_path variables to subaction_path
Subaction paths are the /user/X/Y part of the full path describing the input source/device.
"Subaction paths are a mechanism that enables applications to use the same action name and handle on multiple devices. Applications can query action state using subaction paths that differentiate data coming from each device."

Subpaths, are the input or output specific part of the full path, e.g.
"Each input source path must match the following pattern: …/input/<identifier>[_<location>][/<component>]"
2021-01-20 18:23:09 +01:00
Jakob Bornecrantz 2b996f30c4 xrt: Reflow after column change 2021-01-15 13:50:32 +00:00
Lubosz Sarnecki 521daac012 st/oxr: Port to u_logging.
Remove foo print.
Use correct ENV variable XRT_COMPOSITOR_LOG for Vulkan log.
2020-12-28 13:04:11 +00:00
Christoph Haag 256e2c68d8 xrt: Implement & hook up hand joint tracking infrastructure
Include <inttypes.h> to satisfy older compilers
2020-10-12 22:13:47 +02:00
Christoph Haag ddf3eb5789 st/oxr: Use space graph in global-to-local space transform
This takes care of transforming the velocities.
2020-09-11 19:06:16 +02:00
Christoph Haag 19acc7be25 st/oxr: Pass actual ViewStateFlags to application with xrLocateViews
These flags are originally set by the driver, then processed by the space graph resolver.
2020-09-11 18:52:01 +02:00
Jakob Bornecrantz eaffa05a37 xrt: Remove acceleration components from xrt_space_relation 2020-09-07 23:36:34 +01:00
Jakob Bornecrantz d60cce8977 st/oxr: Use new xrt_space_graph 2020-09-07 23:33:28 +01:00
Ryan Pavlik 146218b346 xrt: Some clang tidy fixes.
A few suppressions as well where clang-tidy did the wrong thing.
2020-08-12 17:11:42 -05:00
Christoph Haag f18c190eaa st/oxr: Check if relating space to itself first 2020-07-20 15:41:17 +02:00
Christoph Haag ddb528f002 st/oxr: Support locating stage space in local space
And the other way around.

Fixes hello_xr -s Local, which renders cubes at offset stage space locations,
relative to local space.
2020-07-20 14:05:31 +02:00
Christoph Haag 164eda38d4 st/oxr: use initial head pose as local space origin
Implements local space in xrLocateViews, xrLocateSpace, and Quad layers in xrEndFrame.
2020-07-19 23:55:20 +02:00
Christoph Haag b7ea0ce2b3 st/oxr: Support next-chained XrSpaceVelocity in XrSpaceLocation 2020-06-26 01:41:08 +02:00
Ryan Pavlik adbafad079 st/oxr: Rename the remaining oxr_source things to oxr_action 2020-06-16 16:42:38 -05:00
Ryan Pavlik 894aa8d61f st/oxr: Rename some types, functions, and variables for clarity 2020-06-15 17:08:05 -05:00
Jakob Bornecrantz 3fde4a0651 st/oxr: Update copyright in files touched by this MR 2020-06-03 09:30:18 +01:00
Jakob Bornecrantz a36753443a st/oxr: Make all oxr_error calls uniform and improve output 2020-06-03 09:30:18 +01:00
Christoph Haag 6045742561 st/oxr: Translate relation_flags in oxr_space_locate() 2020-05-29 01:46:42 +02:00
Christoph Haag 7fe0f3610b st/oxr: Fill entire xrt_space_relation in oxr_xdev_get_pose_at, not just pose
In particular the relation_flags indicate whether the pose is valid or a fallback pose.
2020-05-29 01:25:57 +02:00
Christoph Haag c9b692903c st/oxr: Don't indiscriminately set orientation & position to valid in oxr_space_action_relation() 2020-05-29 01:02:31 +02:00
Jakob Bornecrantz e37d8f4cf5 xrt: Remove timestate from xrt_device interface 2020-04-16 17:29:34 +01:00
Jakob Bornecrantz 0826ff9273 st/oxr: xrCreateActionSpace is fully implemented 2019-10-22 15:19:23 +01:00
Jakob Bornecrantz 937f5d582a st/oxr: Refactor logging options to instance 2019-10-22 11:47:25 +01:00
Drew DeVault a736812f63 oxr: mostly implement XR_SESSION_LOSS_PENDING
This is missing support for xrPollEvents, which needs to be handled
separately as it's not properly rigged up throughout Monado yet.
2019-10-10 22:51:21 +00:00