I’m using a
vtkRenderWindowInteractor with the
vtkInteractorStyleManipulator style applied to it. This allows to rotate the 3D view using mouse gestures.
I was wandering if there is a way to constrain the 3D rotation of the interactor in such a way that the horizon of the camera stays horizontal. In other words, dragging the mouse should allow for yawing and pitching but not rolling (there is a separate shortcut for that). Some pictures to illustrate:
- Default orientation:
- Dragging to the left results in a yaw:
- Dragging downwards results in a pitch:
- This should not be allowed (camera is rolled):
Thanks a lot for the help!