pyvista.RenderWindowInteractor.style#
- property RenderWindowInteractor.style: vtkContextInteractorStyle | vtkInteractorStyle | InteractorStyleCaptureMixin | None[ソース]#
Get/set the current interactor style.
警告
Setting an interactor style needs careful control of events handling. See
InteractorStyleCaptureMixinand its implementation as an example.- 戻り値:
- vtkInteractorStyle | vtkContextInteractorStyle |
None 現在のインタラクタのスタイル.
- vtkInteractorStyle | vtkContextInteractorStyle |
例
Set interactor style with a customized vtk interactor
>>> import pyvista as pv >>> from vtkmodules.vtkInteractionStyle import ( ... vtkInteractorStyleTrackballCamera, ... )
>>> class MyCustomInteractorStyle(vtkInteractorStyleTrackballCamera): ... # Implement custom functionality ... def __repr__(self): ... return 'A custom interactor style.'
>>> plotter = pv.Plotter() >>> plotter.iren.style = MyCustomInteractorStyle() >>> plotter.iren.style A custom interactor style.