Skip to content

Refactoring to support OpenVR and OpenXR, and streamline reuse in SlicerMixedReality  #121

@jcfr

Description

@jcfr

The refactoring is intended to help with:

  • supporting both OpenVR and OpenXR in the context of this extension (SlicerVirtualReality)
  • allowing code reuse within SlicerMixedReality extension

Approach

Similarly to the VTK refactoring introducing vtkRenderingVR common to both vtkRenderingOpenVR and vtkRenderingOpenXR, proposed approach is the following:

  • Create vtkMRMLAbstractVRViewNode that will be common ancestor to vtkMRMLVirtualRealityViewNode and vtkMRMLMixedRealityViewNode
  • Create vtkSlicerAbstractVRLogic providing generic methods like the following:
    • AddVRViewNode
    • GetVRViewNode
    • GetDefaultVRViewNode
    • GetVRConnected / SetVRConnected(bool connect)1
    • GetVRActive / SetVRActive(bool activate)
    • SetDefaultReferenceView
    • SetVolumeRenderingLogic
  • Create reusable widget qSlicerVRConnectionPropertiesWidget2, qSlicerVRDisplayPropertiesWidget (and qSlicerVRAdvancedPropertiesWidget?)
  • Create qMRMLAbstractVRView (common to qMRMLVirtualRealityView and qMRMLMixedRealityView)
    • The view will support running using either the OpenVR or OpenXR runtime
    • qMRMLAbstractVRView will provide generic methods like the following:
      • addDisplayableManager / getDisplayableManagers
      • setCamerasLogic / camerasLogic
      • mrmlAbstractVRViewNode
      • renderer / renderWindow / interactor
      • updateViewFromReferenceViewCamera 3
      • isHardwareConnected 4
      • setActionManifestPath / actionManifestPath
    • qMRMLAbstractVRViewPrivate will provide generic methods like the following:
      • startVR / stopVR
      • desiredUpdateRate / stillUpdateRate
      • doVR
      • createRenderWindow / destroyRenderWindow
  • Create vtkSlicerAbstractVRViewInteractorStyle

Footnotes

  1. To support "remoting", the function vtkSlicerMixedRealityLogic::SetVRConnected(bool connect, const std::string& playerIPAddress) will be changed to get/set the player IP using vtkSlicerMixedRealityLogic::GetPlayerIPAddress/SetPlayerIPAddress

  2. To support "remoting", the SlicerMixedReality extension will instead implement qSlicerVRRemoteConnectionPropertiesWidget

  3. Will have to define what this mean in the context of mixed reality

  4. Since OpenXR introduce the concept of XR instance and session, we may have to revisit the terminology

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions