Does the VTKCommand InteractionEvent also gets triggered when we use the mouse wheel?

I am using the callback function that is supposed to get triggered every time there is an interaction with the objects in the scene. For that, I am using the VTKCommand InteractionEvent. However, what I have noticed is that when we are just using the mouse wheel to zoom in or out (without loving the mouse), it does not seem to trigger an event with InteractionEvent. I was wondering if that is supposed to be the case? If it is, are there any alternatives to InteractionEvent that triggers an Event the moment an interaction happens including for zooming in and out?

I was wondering if that is supposed to be the case?

I think the interactor should emit InteractionEvent for mouse wheel actions in addition to other mouse actions.

If it is, are there any alternatives to InteractionEvent that triggers an Event the moment an interaction happens including for zooming in and out?

Not at the moment. However, you can add the same callback for the MouseWheelForwardEvent and MouseWheelBackwardEvent in addition to InteractionEvent.

iren->AddObserver(vtkCommand::InteractionEvent, cmd);
iren->AddObserver(vtkCommand::MouseWheelForwardEvent, cmd);
iren->AddObserver(vtkCommand::MouseWheelBackwardEvent, cmd);
1 Like