vtkMouseCameraTrackballPanManipulator 平移 vtkMouseCameraTrackballZoomManipulator 缩放 vtkMouseCameraTrackballRollManipulator 中心点旋转vtkMouseCameraTrackballRotateManipulator 整体旋转vtkMouseCameraTrackballZoomToMouseManipulator 缩放
const interactorStyle = vtkInteractorStyleManipulator.newInstance(); fullScreenRenderer.getInteractor().setInteractorStyle(interactorStyle); const manipulator = vtkMouseCameraTrackballRotateManipulator.newInstance(); setButton的值为1,2,3;1为鼠标左键,2为鼠标滚轮,3为鼠标右键 manipulator.setButton(1); setShift,setControl,setAlt键的值默认为false,如只设置setShift为true时,我们点击鼠标对应键时再按住shift键即能让效果生效;其alt,ctrl键同理; 当我们设置两个值为true时需要同时按住两个对应的键再按住鼠标对应设置值进行拖动才能让功能生效 manipulator.setShift(false); manipulator.setControl(false); manipulator.setAlt(false); interactorStyle.addMouseManipulator(manipulator);