Skip to content

Fix interaction support renaming VR interactor style callback functions#108

Merged
cpinter merged 1 commit intoKitwareMedical:masterfrom
LucasGandel:fix-grab-dolly-interactions
Feb 13, 2023
Merged

Fix interaction support renaming VR interactor style callback functions#108
cpinter merged 1 commit intoKitwareMedical:masterfrom
LucasGandel:fix-grab-dolly-interactions

Conversation

@LucasGandel
Copy link
Contributor

@LucasGandel LucasGandel commented Jan 27, 2023

This commit initiates renaming of the interactor style event callback functions to support the action based input model introduced in Slicer/VTK@b7f02e6

This commit adds support for Select3DEvent and ViewerMovement3DEvent.

  • Select3DEvent: The action performed when this event is fired is defined by calling MapInputToAction (see [1]).
  • ViewerMovement3DEvent: Gives users the ability to fly by calling Dolly3D(). VTK's interactor style offers additional behavior to move around.

[1] https://gitlab.kitware.com/vtk/vtk/-/blob/master/Rendering/VR/vtkVRInteractorStyle.cxx#L61

Future commits could focus on:

  • Completing synchronization of this class with vtkVRInteractorStyle:

    • Add support for Grounded movement style for ViewerMovement3DEvent
    • Add support for Elevation3DEvent, Pick3DEvent, Clip3DEvent, NextPose3DEvent, Menu3DEvent
  • Confirm that multi gesture events (Pan, Rotate and Pinch) are functional if pressing the grip buttons, and propose new approach to customize the gesture button in VTK. Multi-gesture is handled by the interactor but only triggered by grip buttons (see [2]). This deprecates the vtkVirtualRealityViewInteractor::SetGestureButtonTo function.

[2] https://github.com/Slicer/VTK/blob/slicer-v9.1.20220125-efbe2afc2/Rendering/VR/vtkVRRenderWindowInteractor.cxx#L366

@LucasGandel
Copy link
Contributor Author

@jcfr Please review

@jcfr jcfr force-pushed the fix-grab-dolly-interactions branch 2 times, most recently from cda0a3b to fae1799 Compare January 30, 2023 01:13
@jcfr
Copy link
Contributor

jcfr commented Jan 30, 2023

re: multi gesture

Custom heuristic for handling complex gesture in SlicerVirtualReality has been restored in #109 through the backport of VTK MR-9892 to Slicer/VTK@slicer-v9.1.20220125-efbe2afc2

@jcfr jcfr changed the title Rename VR interactor style callback functions Fix interaction support renaming VR interactor style callback functions Jan 30, 2023
@jcfr jcfr force-pushed the fix-grab-dolly-interactions branch from fae1799 to 443cbee Compare February 2, 2023 13:08
@jcfr
Copy link
Contributor

jcfr commented Feb 2, 2023

@cpinter Since probably worked on this during the project week, I suggest we consolidate this with you work.

This commit initiates renaming of the interactor style event callback
functions to support the action based input model introduced in
Slicer/VTK@b7f02e6

This commit adds support for Select3DEvent and ViewerMovement3DEvent.
 - Select3DEvent: The action performed when this event is fired is defined
   by calling MapInputToAction (see [1]).
 - ViewerMovement3DEvent: Gives users the ability to fly by calling
   Dolly3D(). VTK's interactor style offers additional behavior to move
   around.

[1] https://gitlab.kitware.com/vtk/vtk/-/blob/master/Rendering/VR/vtkVRInteractorStyle.cxx#L61

Future commits could focus on:
- Completing synchronization of this class with vtkVRInteractorStyle:
  . Add support for Grounded movement style for ViewerMovement3DEvent
  . Add support for Elevation3DEvent, Pick3DEvent, Clip3DEvent
    NextPose3DEvent, Menu3DEvent

- Confirm that multi gesture events (Pan, Rotate and Pinch) are functional
  if pressing the grip buttons, and propose new approach to customize the
  gesture button in VTK.
  Multi-gesture is handled by the interactor but only triggered by grip
  buttons (see [2]). This deprecates the
  vtkVirtualRealityViewInteractor::SetGestureButtonTo*** function.

[2] https://github.com/Slicer/VTK/blob/slicer-v9.1.20220125-efbe2afc2/Rendering/VR/vtkVRRenderWindowInteractor.cxx#L366
@LucasGandel LucasGandel force-pushed the fix-grab-dolly-interactions branch from 443cbee to 60fe85b Compare February 10, 2023 16:38
@LucasGandel
Copy link
Contributor Author

@cpinter confirmed this fixes the basic interactions. There are no noticeable improvements to add after the project week.

I just removed the commented code, can someone with "write access" can merge this so that other people benefit from the fix?

@cpinter cpinter merged commit a5468fc into KitwareMedical:master Feb 13, 2023
@cpinter
Copy link
Collaborator

cpinter commented Feb 13, 2023

Thanks a lot @LucasGandel !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants