vtkRenderWindowInteractor - provide event driven interface to rendering window
Super Class: vtkObject
Description:
vtkRenderWindowInteractor is a convenience object that provides event bindings to common graphics functions. For example, camera or actor zoom-in/zoom-out, pan, rotate, spin, dolly, scale, resetting in either trackball or joystick mode; picking of actors, points, or cells; switching in/out of stereo mode; property changes such as wireframe and surface; and a toggle to force the light to be placed at camera viewpoint (pointing in view direction).
Mouse bindings:
camera: Button 1 - rotate
Button 2 - pan
Button 3 - zoom
ctrl-Button 1 - spin
actor: Button 1 - rotate
Button 2 - pan
Button 3 - uniform scale
ctrl-Button 1 - spin
ctrl-Button 2 - dolly.
Keyboard bindings (upper or lower case):
j - joystick like mouse interactions
t - trackball like mouse interactions
o - object/ actor interaction
c - camera interaction
r - reset camera view
w - turn all actors wireframe
s - turn all actors surface
u - execute user defined function
p - pick actor under mouse pointer (if pickable)
3 - toggle in/out of 3D mode (if supported by renderer)
e - exit
q - exit
Camera mode and joystick mode are the default modes for compatibility.
When "j" is pressed, the interaction models after a joystick. The distance
from the center of the renderer viewport determines how quickly to rotate,
pan, zoom, spin, and dolly. This is the default mode for compatiblity
reasons. This is also known as position sensitive motion.
When "t" is pressed, the interaction models after a trackball. Each mouse
movement is used to move the actor or camera. When the mouse stops, the
camera or actor motion is also stopped. This is also known as motion
sensitive motion.
Rotate, pan, and zoom work the same way as before. Spin has two different
interfaces depending on whether the interactor is in trackball or joystick
mode. In trackball mode, by moving the mouse around the camera or actor
center in a circular motion, the camera or actor is spun. In joystick mode
by moving the mouse in the y direction, the actor or camera is spun. Scale
dolly, and zoom all work in the same manner, that motion of mouse in y
direction generates the transformation.
The event bindings for Camera mode and Actor mode are very similar, with
the exception of zoom (Camera only), and scale and dolly (Actor only). The
same user events elicit the same responses from the interactor.
When the "p" key is pressed, an actor is selected using the user supplied
picker if one exist, or the default picker if one does not. The picked
actor is NOT used for actor mode interactions. To interact with an actor,
click on the actor with the pointer in Actor mode, and an internal picker
will select the appropriate actor. Since the selections of the actors are
for different purposes, and handled by two different pickers, the
previously selected actor will be unselected when the interaction mode
has been switched between Actor mode and Camera mode.
Interactors for a particular platform may have additional, specific event
bindings. Please see the documentation for the subclasses.
See Also:
vtkXRenderWindowInteractor vtkWin32RenderWindowInteractor vtkPicker
Methods:
Detailed Method Descriptions:
![]()
| void Initialize () | |
| void Start () |
![]()
| void Enable () | |
| void Disable () | |
| int GetEnabled () |
![]()
| void SetRenderWindow (vtkRenderWindow *) | |
| vtkRenderWindow *GetRenderWindow () |
![]()
| void SetLightFollowCamera (int ) | |
| int GetLightFollowCamera () | |
| void LightFollowCameraOn () | |
| void LightFollowCameraOff () |
![]()
| void SetDesiredUpdateRate (float ) | |
| float GetDesiredUpdateRate () |
![]()
| void SetStillUpdateRate (float ) | |
| float GetStillUpdateRate () |
![]()
| int GetInitialized () |
![]()
| void FindPokedCamera (int ,int ) | |
| void FindPokedRenderer (int ,int ) |
![]()
| void HighlightActor (vtkActor *) |
![]()
| void SetStartPickMethod (const ) |
![]()
| void SetStartPickMethodArgDelete (const ) |
![]()
| void SetEndPickMethod (const ) |
![]()
| void SetEndPickMethodArgDelete (const ) |
![]()
| void SetStartInteractionPickMethod (const ) |
![]()
| void SetStartInteractionPickMethodArgDelete (const ) |
![]()
| void SetEndInteractionPickMethod (const ) |
![]()
| void SetEndInteractionPickMethodArgDelete (const ) |
![]()
| void SetPicker (vtkPicker *) |
![]()
| vtkPicker *GetPicker () |
![]()
| vtkPicker *CreateDefaultPicker () |
![]()
| void SetUserMethod (const ) |
![]()
| void SetUserMethodArgDelete (const ) |
![]()
| void SetExitMethod (const ) |
![]()
| void SetExitMethodArgDelete (const ) |
![]()
| void SetTimerMethod (const ) |
![]()
| void SetTimerMethodArgDelete (const ) |
![]()
| void SetLeftButtonPressMethod (const ) |
![]()
| void SetLeftButtonPressMethodArgDelete (const ) |
![]()
| void SetLeftButtonReleaseMethod (const ) |
![]()
| void SetLeftButtonReleaseMethodArgDelete (const ) |
![]()
| void SetMiddleButtonPressMethod (const ) |
![]()
| void SetMiddleButtonPressMethodArgDelete (const ) |
![]()
| void SetMiddleButtonReleaseMethod (const ) |
![]()
| void SetMiddleButtonReleaseMethodArgDelete (const ) |
![]()
| void SetRightButtonPressMethod (const ) |
![]()
| void SetRightButtonPressMethodArgDelete (const ) |
![]()
| void SetRightButtonReleaseMethod (const ) |
![]()
| void SetRightButtonReleaseMethodArgDelete (const ) |
![]()
| void SetCameraModeMethod (const ) |
![]()
| void SetCameraModeMethodArgDelete (const ) |
![]()
| void SetActorModeMethod (const ) |
![]()
| void SetActorModeMethodArgDelete (const ) |
![]()
| void SetTrackballModeMethod (const ) |
![]()
| void SetTrackballModeMethodArgDelete (const ) |
![]()
| void SetJoystickModeMethod (const ) |
![]()
| void SetJoystickModeMethodArgDelete (const ) |
![]()
| void SetEventPosition (int ,int ) | |
| void SetEventPosition (int *) | |
| int *GetEventPosition () |
![]()
| void StartRotate () | |
| void EndRotate () | |
| void StartZoom () | |
| void EndZoom () | |
| void StartPan () | |
| void EndPan () | |
| void StartSpin () | |
| void EndSpin () | |
| void StartDolly () | |
| void EndDolly () | |
| void StartUniformScale () | |
| void EndUniformScale () |
![]()
| void UnRegister (vtkObject *) |
![]()
| void SetPicker (vtkPicker &) |
![]()
| void SetActorModeToCamera () | |
| void SetActorModeToActor () | |
| int GetActorMode () |
![]()
| void SetTrackballModeToTrackball () | |
| void SetTrackballModeToJoystick () | |
| int GetTrackballMode () |
![]()
| void SetSize (int ,int ) | |
| void SetSize (int *) | |
| int *GetSize () |
![]()