Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG: Fix integration with updated Slicer event delegation and VTK Ope…
…nVR API (#131) * BUG: Fix integration with updated Slicer event delegation and VTK OpenVR API Addressing issues highlighted in Slicer/Slicer@1cc3b2c62, this commit introduces the `vtkVirtualRealityViewInteractorObserver` class. This addition streamlines event delegation to MRML displayable managers and their associated widgets by leveraging observation of the interactor style. The modification enables the `vtkVirtualRealityViewInteractorStyle` to inherit from `vtkOpenVRInteractorStyle`, eliminating the need for redundant code implementation and duplication. It also updates the use of `MapInputToAction()` to map "eventId to state" following the VTK refactoring introduced in Kitware/VTK@b7f02e622 (update openvr to action based input model). Co-authored-by: Lucas Gandel <[email protected]> Co-authored-by: Sankhesh Jhaveri <[email protected]> * BUG: Restore handling of complex gesture and fix event processing This commit revisits the invocation of `vtkMRMLViewInteractorStyle::ProcessEvents` to prioritize event processing specific to `VirtualReality`. The additional processing is now performed only if the events have not been processed already. Furthermore, this commit restores the support for calling `OnStartGesture` and `OnEndGesture`, which was inadvertently omitted in the previous commit titled "BUG: Fix integration with updated Slicer event delegation and VTK OpenVR API." Co-authored-by: Sankhesh Jhaveri <[email protected]> * BUG: Ensure passing of vtkEventData to displayable managers This commit follows up to "BUG: Fix integration with updated Slicer event delegation and VTK OpenVR API". It ensures that existing event data objects are consistently passed down to the `Delegate` functions and associated displayable managers. * BUG: Ensure All Events are Processed through the VR CustomProcessEvents Callback Following the previous commit titled "BUG: Ensure passing of vtkEventData to displayable managers," this update guarantees the effective invocation of the newly introduced custom delegation function, designed to handle a calldata argument. This ensures that all processing is funneled through the `vtkVirtualRealityViewInteractorObserver::CustomProcessEvents` callback. The callback is responsible for handling 3D event data and passing it down appropriately. --------- Co-authored-by: Lucas Gandel <[email protected]> Co-authored-by: Sankhesh Jhaveri <[email protected]>
- Loading branch information