You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DOC: Update README and DeveloperGuide to document OpenXR backend support
In the README:
- Revise the top-level and Setup sections to reflect OpenXR support.
- Update existing headset setup instructions to cover both OpenXR and OpenVR setups, with OpenXR being enabled by default. Added a note at the end of the section explaining how to enable OpenVR support.
- Add new sections for "Hololens 2" and "Meta Quest" headsets
- Add entries for "Supported headsets" and "Supported XR modality" to each headset section
- Add "How to use hand interaction" section
- Update the Contributors section to acknowledge @LucasGandel and @sankhesh.
In the DeveloperGuide:
- Remove obsolete build instructions.
- Update Python snippet.
- Add references to the documentation of associated VTK modules.
- Add the "Mapping of Controller Action to VTK event" section.
Copy file name to clipboardExpand all lines: DeveloperGuide.md
+82-24
Original file line number
Diff line number
Diff line change
@@ -4,20 +4,79 @@ This Slicer extension is in active development. The API may change from version
4
4
5
5
## Build instructions
6
6
7
-
- Build the extension against the newly built Slicer with Qt5 and VTK9 enabled.
8
-
- To start Slicer from a build tree and ensure the extension is properly loaded, considering using the ``--launcher-additional-settings`` option:
7
+
- Build the extension against the newly built Slicer.
8
+
- To start Slicer from a build tree and ensure the extension is properly loaded, consider running the `SlicerWithVirtualReality` launcher. For more details, see [here](https://slicer.readthedocs.io/en/latest/developer_guide/extensions.html#run-slicer-with-your-custom-modules).
- Add (SlicerVirtualReality-binary)\inner-build\lib\Slicer-4.9\qt-loadable-modules\Release folder to additional module paths in Slicer application settings.
12
+
The mapping process consists of two main steps:
19
13
20
-
Note that specifying the top-level build directory of the extension ensures that Slicer find all types of modules.
14
+
1. Parsing the `vtk_open<vr|xr>_actions.json` action manifest file to link controller-specific interaction paths with generic event paths. This file references controller-specific binding files, usually named `vtk_open<vr|xr>_binding_<vendor_name>.json`, where each controller interaction path is associated with a VTK-specific event path.
15
+
16
+
2. Assigning a VTK event path to either a VTK event or a `std::function`. This association of a VTK event path involving a single controller with a VTK event is carried out in `vtkOpen<VR|XR>InteractorStyle::SetupActions()`.
17
+
18
+
### Action Manifest File
19
+
20
+
The controller interaction paths are specific to each backend:
21
+
22
+
* For OpenVR: Refer to the [List of common controller types](https://github.com/ValveSoftware/openvr/wiki/List-of-common-controller-types) and the [SteamVR Input Guide](https://github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings/blob/master/docs/SteamVRInputGuide.md).
23
+
* For OpenXR: Refer to the [Reserved Paths](https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#semantic-path-reserved) and the [Interaction Profile Paths](https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#semantic-path-interaction-profiles).
24
+
25
+
As of [Slicer@c7fe8657c](https://github.com/Slicer/Slicer/commit/c7fe8657c6a4bc0666685349b3222ff3c1b4fa02), the provided `vtk_open<vr|xr>_actions.json` and `vtk_open<vr|xr>_binding_<vendor_name>.json` files in the `vtkRenderingOpenVR` and `vtkRenderingOpenXR` VTK modules are as follow:
Recognition of complex gesture events commences when the two controller buttons mapped to the ComplexGesture action are pressed.
70
+
71
+
The SlicerVirtualReality implements its own heuristic by specializing the `HandleComplexGestureEvents()` and `RecognizeComplexGesture()` in the [vtkVirtualRealityComplexGestureRecognizer][vtkVirtualRealityComplexGestureRecognizer-url] class.
* The selected controller buttons are exclusively mapped to the ComplexGesture action and cannot be associated with a regular action.
78
+
79
+
* To workaround an OpenVR specific [limitation](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/10778), each button expected to be involved in the complex gesture needs to be respectively associated with `/actions/vtk/in/ComplexGestureAction` and `/actions/vtk/in/ComplexGestureAction_Event2`.
0 commit comments